Compare commits

...
Author SHA1 Message Date
Wade Berrier 0aea5e52ca configure.in: version bump
svn path=/branches/mono-1-1-13/mono/; revision=60560
2006-05-10 22:28:02 +00:00
Miguel de Icaza 0736b7281e Fix
svn path=/branches/mono-1-1-13/mcs/; revision=60558
2006-05-10 21:24:56 +00:00
Miguel de Icaza 3fb541562b Fix from RobertJ for the tests
svn path=/branches/mono-1-1-13/mcs/; revision=60552
2006-05-10 19:58:44 +00:00
Miguel de Icaza 3e8a43adfb Take this patch out as the case it fixes is not as common as the regression it introduces
svn path=/branches/mono-1-1-13/mono/; revision=60547
2006-05-10 19:34:54 +00:00
Miguel de Icaza 4828d630c8 Remove this test, it fails randomly, we know about it
svn path=/branches/mono-1-1-13/mono/; revision=60546
2006-05-10 19:32:05 +00:00
Miguel de Icaza a52736b7a4 bmcs compiler is not used either
svn path=/branches/mono-1-1-13/mcs/; revision=60544
2006-05-10 19:12:20 +00:00
Miguel de Icaza 163b45a5f7 Mbas is not supported in 1.1.13.x
svn path=/branches/mono-1-1-13/mcs/; revision=60543
2006-05-10 19:10:21 +00:00
Zoltan Varga 20889ba677 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=60530
2006-05-10 17:28:59 +00:00
Ankit Jain 81051c19f2 In ilasm/parser:
* ILParser.jay (native_type | K_ERROR): Use NativeType.Error for the
	value.
	(native_type | K_LPSTRUCT): Likewise for K_LPSTRUCT.

In class/PEAPI:

	* Metadata.cs (NativeType): Add LPStruct and Error.

svn path=/branches/mono-1-1-13/mcs/; revision=60501
2006-05-10 11:34:30 +00:00
Ankit Jain 894439a587 * get.c (init_key_table): Add keyword 'switch'.
svn path=/branches/mono-1-1-13/mono/; revision=60498
2006-05-10 11:20:01 +00:00
Ankit Jain 9c5d5e7589 * get.c (init_key_table): Add keyword 'property'.
svn path=/branches/mono-1-1-13/mono/; revision=60495
2006-05-10 08:41:25 +00:00
Ankit Jain 07e241e2b1 In ilasm/scanner:
* ILTables.cs (keywords): Add 'property' for NET_2_0.

In ilasm/parser:

	* ILParser.jay: Add K_PROPERTY.

svn path=/branches/mono-1-1-13/mcs/; revision=60493
2006-05-10 07:56:52 +00:00
Zoltan Varga 61c9ea652f 2006-05-10 Zoltan Varga <[email protected]>
* mini-ia64.c (get_call_info): Fix handling of MONO_TYPE_GENERICINST.

	* mini-amd64.c (mono_arch_instrument_epilog): Ditto.

svn path=/branches/mono-1-1-13/mono/; revision=60477
2006-05-09 22:07:14 +00:00
Ankit Jain e12df734e5 In ilasm/codegen:
* MethodDef.cs (MethodDef.AddLabel): Throw exception for duplicate
	labels.

In ilasm/errors:
	* err-dup-label.il: New.

svn path=/branches/mono-1-1-13/mcs/; revision=60460
2006-05-09 17:49:56 +00:00
Ankit Jain f3c1074b8b 2006-05-09 Sebastien Pouliot <[email protected]>
* test-sn-key.il: New. Added test case when /key is used but the IL 
	source doesn't include a .publickey directive or any attribute that
	loads the public key.
	* test-sn-module.il: New. Added test case when /key is used when
	assembling a netmodule (signing shouldn't occur).

Backporting

svn path=/branches/mono-1-1-13/mcs/; revision=60458
2006-05-09 17:43:10 +00:00
Ankit Jain 5b3ec0465c In ilasm/codegen:
* CodeGen.cs (CodeGen.data_list): Change to ..
	(CodeGen.data_table): .. a hashtable.
	(CodeGen.AddDataDef): Update to throw exception for duplicate .data
	labels.
	(CodeGen.GetDataConst): Update to use data_table.

In ilasm/errors:

	* err-dup-datalabel.il: New.

svn path=/branches/mono-1-1-13/mcs/; revision=60455
2006-05-09 17:17:50 +00:00
Sebastien Pouliot 5197eff485 2006-05-09 Sebastien Pouliot <[email protected]>
* Driver.cs: Move up the loading of the strongname key pair to allow
	embedding the public part into the assembly. Also don't try to sign
	netmodules.


svn path=/branches/mono-1-1-13/mcs/; revision=60450
2006-05-09 15:23:33 +00:00
Gonzalo Paniagua Javier b71dfbe5bf 2006-05-06 Gonzalo Paniagua Javier <[email protected]>
* ResponseStream.cs:
	* HttpListenerResponse.cs: allow 0 length POST. Patch by Horst Reiterer.
	Closes bug #78316.


svn path=/branches/mono-1-1-13/mcs/; revision=60366
2006-05-06 20:47:15 +00:00
Sebastien Pouliot 54775ae1a1 2006-05-05 Sebastien Pouliot <[email protected]>
* ExecutionContext.cs: Don't capture the compressed stack unless the 
	security manager is active (this wasn't ready to be called in 
	production code).


svn path=/branches/mono-1-1-13/mcs/; revision=60300
2006-05-05 15:27:10 +00:00
Miguel de Icaza cba302c309 2006-05-03 Jb Evain <[email protected]>
* MonoField.cs (GetValue,SetValue): throw a TargetException
	when the field is non static and the target is null.

svn path=/branches/mono-1-1-13/mcs/; revision=60233
2006-05-03 18:09:14 +00:00
Miguel de Icaza ebcbcb5d6c 2006-04-29 Atsushi Enomoto <[email protected]>
* UnexceptionalStreamReader.cs (Read): Fix for #78218, where we
	consumed characters from the input even when the count was not set
	to zero, causing some characters to be missing in some
	circumstances. 

svn path=/branches/mono-1-1-13/mcs/; revision=60077
2006-04-29 15:34:00 +00:00
Gonzalo Paniagua Javier ac73df99bd 2006-04-27 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: reset the challenge and the status code when
	creating the tunnel and sending the proxy auth. headers. Improve error
	message when there's an error creating the tunnel.
	* HttpWebRequest.cs: don't trigger an early throw for a POST that gets
	a 401 or 407 response.


svn path=/branches/mono-1-1-13/mcs/; revision=60023
2006-04-28 00:49:10 +00:00
Gonzalo Paniagua Javier 98c7aaaed3 2006-04-26 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionData.cs:
	* WebConnection.cs:
	* HttpWebRequest.cs: when tunneling an ssl conneciton through a proxy,
	we were not handling a proxy authentication request. Fixes bug #78150
	take 2.


svn path=/branches/mono-1-1-13/mcs/; revision=59953
2006-04-26 21:17:01 +00:00
Dick Porter 797397d18e 2006-04-26 Dick Porter <[email protected]>
* sockets.c (WSAIoctl): Check the output buffer is valid before
        writing to it.

        * handles.c (_wapi_search_handle): Set shared pointer if we find a
        shared handle that has been already opened.

2006-04-26  Dick Porter  <[email protected]>

        * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
        dereference.



svn path=/branches/mono-1-1-13/mono/; revision=59931
2006-04-26 15:22:32 +00:00
Gonzalo Paniagua Javier 7b9b6217c3 2006-04-25 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: make sure that the application start event
	is run before any request is processed.


svn path=/branches/mono-1-1-13/mcs/; revision=59893
2006-04-25 23:46:27 +00:00
Wade Berrier 32fa15d9b0 * scripts/mono-find-provides.in: Only scan files that are in the gac.
This allows packages to contain private assemblies that won't conflict
with other packages. Fixes bugzilla.novell.com #144655.


svn path=/branches/mono-1-1-13/mono/; revision=59882
2006-04-25 22:20:40 +00:00
Gonzalo Paniagua Javier ffa2b975f0 backport from head
svn path=/branches/mono-1-1-13/mcs/; revision=59823
2006-04-24 19:32:02 +00:00
Gonzalo Paniagua Javier 2dbfa821bc 2006-04-24 Gonzalo Paniagua Javier <[email protected]>
* HttpServerUtility.cs: don't reset the query string in Execute() when
	the path does not contain it and we have one from the previous request.
	Fixes bug #78177.


svn path=/branches/mono-1-1-13/mcs/; revision=59817
2006-04-24 15:44:56 +00:00
Ankit Jain 7f04a3171f In ilasm/tests:
* test-module.il: New. Test for a netmodule.

In ilasm/codegen:

	* CodeGen.cs (CodeGen.ctor): Remove 'is_assembly' param.
	(CodeGen.Write): Emit assembly manifest only if the source
	had it.

In ilasm:

	* Driver.cs (DriverMain.Run): Update use of CodeGen.ctor .

In class/PEAPI:

	* PEAPI.cs (PEFile.WritePEFile): ReserveStrongNameSignatureSpace only if
	we have assembly manifest.

svn path=/branches/mono-1-1-13/mcs/; revision=59797
2006-04-24 08:43:24 +00:00
Gonzalo Paniagua Javier 6a795f3474 2006-04-21 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputRadioButton.cs: Value returns the ID only when there's no
	"value" set. Fixes bug #78101.


svn path=/branches/mono-1-1-13/mcs/; revision=59772
2006-04-21 18:52:41 +00:00
Gonzalo Paniagua Javier d573fd2398 2006-04-21 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputRadioButtonTest.cs: added test for bug #78101.


svn path=/branches/mono-1-1-13/mcs/; revision=59771
2006-04-21 18:52:15 +00:00
Dick Porter 73148692c4 2006-04-21 Dick Porter <[email protected]>
* mini.c (mini_thread_cleanup): Clear the JIT TLS data when
        cleaning up a thread.  Fixes the new part of bug 77470.

2006-04-21  Dick Porter  <[email protected]>

        * threads.c (GetCurrentThread): Reference the handle if we return
        an already-known thread.

2006-04-21  Dick Porter  <[email protected]>

        * threads.c (mono_thread_detach): Fix reference counting when
        detaching threads.



svn path=/branches/mono-1-1-13/mono/; revision=59765
2006-04-21 16:19:25 +00:00
Zoltan Varga cd432233b6 2006-04-21 Zoltan Varga <[email protected]>
* corlib.dll.sources: Add System.IO/FileOptions.cs.

svn path=/branches/mono-1-1-13/mcs/; revision=59754
2006-04-21 13:49:02 +00:00
Zoltan Varga 8aa7e04577 2006-04-21 Zoltan Varga <[email protected]>
* FileStream.cs: Add new net 2.0 ctor.

	* FileOptions.cs: New file.

svn path=/branches/mono-1-1-13/mcs/; revision=59753
2006-04-21 13:48:25 +00:00
Sebastien Pouliot 363e181509 2006-04-21 Sebastien Pouliot <[email protected]>
* SslCipherSuite.cs: Enable abbreviated handshakes for SSL3 too.


svn path=/branches/mono-1-1-13/mcs/; revision=59746
2006-04-21 12:50:09 +00:00
Gonzalo Paniagua Javier 649261a954 2006-04-20 Gonzalo Paniagua Javier <[email protected]>
* WebProxy.cs: a .ctor was not forwarding the 'credentials' argument.
	This fixes bug #78150. Also fix the bypass check for local requests.


svn path=/branches/mono-1-1-13/mcs/; revision=59716
2006-04-20 22:47:26 +00:00
Sebastien Pouliot c215e04d0d 2006-04-20 Sebastien Pouliot <[email protected]>
* SessionConfig.cs: Avoid a cast.
	* SessionDictionary.cs: Remove unused internal methods.
	* SessionId.cs: Const-ify internal/private values.
	* SessionStateModule.cs: Const-ify internal/private values.


svn path=/branches/mono-1-1-13/mcs/; revision=59702
2006-04-20 14:26:08 +00:00
Gonzalo Paniagua Javier 5eea16f92e 2006-04-18 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs:
	(TransmitFile): make sure we can read the file before buffering it.


svn path=/branches/mono-1-1-13/mcs/; revision=59610
2006-04-18 20:48:25 +00:00
Gonzalo Paniagua Javier 870c8d6435 2006-04-18 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: don't fail on events that are not
	EventHandlers. Patch by Matthew Metnetsky.


svn path=/branches/mono-1-1-13/mcs/; revision=59604
2006-04-18 17:20:08 +00:00
Zoltan Varga df5a4fd2cc Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=59529
2006-04-16 19:29:25 +00:00
Konstantin Triger e2f3c657d1 merge -r 59518:59519
svn path=/branches/mono-1-1-13/mcs/; revision=59520
2006-04-16 05:55:06 +00:00
Zoltan Varga 1e089c4c73 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=59423
2006-04-12 20:55:15 +00:00
Zoltan Varga 224c2402b6 2006-04-12 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
	in the CALL_MEMBASE opcodes. Fixes #78088.
	(mono_arch_get_vcall_slot_addr): Ditto.

svn path=/branches/mono-1-1-13/mono/; revision=59418
2006-04-12 19:07:02 +00:00
Zoltan Varga ebdb8bd598 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=59417
2006-04-12 19:06:11 +00:00
Zoltan Varga 35837a869c Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=59407
2006-04-12 16:29:55 +00:00
Sebastien Pouliot 4971f83ca0 fixes to server code and to the bad cache problem (#78085) from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=59402
2006-04-12 15:28:36 +00:00
Konstantin Triger 185b672518 merge -r 59347:59348
svn path=/branches/mono-1-1-13/mcs/; revision=59398
2006-04-12 08:37:29 +00:00
Gonzalo Paniagua Javier 6b2f395ce4 2006-04-10 Gonzalo Paniagua Javier <[email protected]>
* HttpUtilityTest.cs: new tests. Patch by Vladimir Krasnov.


svn path=/branches/mono-1-1-13/mcs/; revision=59327
2006-04-10 22:19:51 +00:00
Gonzalo Paniagua Javier 311bb403fa 2006-04-10 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: allow "%%" as a escape for '%' and ignore invalid
	hexadecimal characters. Based on a patch by Vladimir Krasnov.

2006-04-05 Andrew Skiba <[email protected]>

	* HttpUtility: UrlEncode and UrlEncodeUnicode logic unified, behaviour
	fixed to match dotnet and http://rfc.net/rfc1738.html


svn path=/branches/mono-1-1-13/mcs/; revision=59326
2006-04-10 22:10:52 +00:00
Gonzalo Paniagua Javier 5a353ecead 2006-04-10 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: fix race condition when a directory is created and
	populated before we start monitoring it. Patch by Thong Nguyen.


svn path=/branches/mono-1-1-13/mcs/; revision=59323
2006-04-10 21:22:03 +00:00
Wade Berrier 1d22f02f3f version bump
svn path=/branches/mono-1-1-13/mono/; revision=59321
2006-04-10 20:07:20 +00:00
Gonzalo Paniagua Javier 0a9a60c2a8 req. threshold
svn path=/branches/mono-1-1-13/mono/; revision=59320
2006-04-10 19:24:01 +00:00
Gonzalo Paniagua Javier da649d3804 missing in theprevious commit
svn path=/branches/mono-1-1-13/mcs/; revision=59318
2006-04-10 19:21:00 +00:00
Gonzalo Paniagua Javier 81657d2a45 2006-03-19 Gonzalo Paniagua Javier <[email protected]>
* System.Web/TempFileStream.cs: a FileStream that removes the file once
	it is disposed.
	* System.Web/HttpRequest.cs: support for writing request data to on-disk
	files if the request is longer than the threshold specified in the
	configuration files. In mono this will work for 1.x and 2.0, while with
	MS this only works for 2.0.
	* System.Web.dll.sources: add TempFileStream.cs
	* System.Web.Configuration/HttpRuntimeConfigurationHandler.cs: removed
	a bunch of useless stuff for 1.x.


svn path=/branches/mono-1-1-13/mcs/; revision=59317
2006-04-10 19:19:50 +00:00
Zoltan Varga d62d823250 2006-04-10 Zoltan Varga <[email protected]>
* driver.c (mono_main): Fix --with-gc=none build.

svn path=/branches/mono-1-1-13/mono/; revision=59301
2006-04-10 13:48:50 +00:00
Atsushi Eno b92f21c9de merged r59286. btw updating svn:eol-style makes no sense :-(
svn path=/branches/mono-1-1-13/mcs/; revision=59290
2006-04-10 10:07:56 +00:00
Gonzalo Paniagua Javier 5d9ba8a7f5 2006-04-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWriter.cs: only keep the byte buffer around if its size is less
	than or equals to 32K.

2006-04-08  Miguel de Icaza  <[email protected]>

	* HttpWriter.cs (Write): Added missing check for null string as
	something is now calling it like that. 

2006-03-27 Joshua Tauberer <[email protected]>

	* HttpWriter.cs: Avoid creation of a byte[] on each Write()
	  by reusing and resizing a private array.


svn path=/branches/mono-1-1-13/mcs/; revision=59261
2006-04-09 04:16:42 +00:00
Gonzalo Paniagua Javier f861912761 ChangeLog
svn path=/branches/mono-1-1-13/mcs/; revision=59221
2006-04-07 20:12:12 +00:00
Gonzalo Paniagua Javier 78f1c62a9e 2006-04-07 Gonzalo Paniagua Javier <[email protected]>
* HttpRequest.cs: the field content_length can be < 0 and then we try to 	read when there's no data and block.


svn path=/branches/mono-1-1-13/mcs/; revision=59217
2006-04-07 19:18:29 +00:00
Wade Berrier 3b0c5507b5 fix macro syntax
svn path=/branches/mono-1-1-13/mono/; revision=59188
2006-04-07 16:53:45 +00:00
Dick Porter 8c7fc6463d 2006-04-07 Dick Porter <[email protected]>
* processes.c: Fix build for older glib.



svn path=/branches/mono-1-1-13/mono/; revision=59181
2006-04-07 15:26:33 +00:00
Miguel de Icaza 645085d014 Backport fix: 2006-04-06 Jonathan Pryor <[email protected]>
* NativeConvert.cs: Fix ToDateTime()/FromDateTime()/ToTimeT()/FromTimeT() so
	  that they take timezones into account.  Previously, results would be off
	  by an hour if Daylight Savings Time was in effect.  Fixes #78033.

svn path=/branches/mono-1-1-13/mcs/; revision=59163
2006-04-07 00:03:43 +00:00
Gonzalo Paniagua Javier ee4086a969 bug #
svn path=/branches/mono-1-1-13/mcs/; revision=59150
2006-04-06 22:19:26 +00:00
Gonzalo Paniagua Javier e4eba2857c 2006-04-06 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: add new directories to the hashtable after start
	monitoring them, otherwise the ReqNum is not set. Fixes bug #78029.


svn path=/branches/mono-1-1-13/mcs/; revision=59148
2006-04-06 22:18:41 +00:00
Gonzalo Paniagua Javier 422d70701a 2006-04-06 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs: don't remove the Set-Cookie headers. Fixes bug
	#78028.


svn path=/branches/mono-1-1-13/mcs/; revision=59134
2006-04-06 18:51:19 +00:00
Dick Porter 472e87825e 2006-04-06 Dick Porter <[email protected]>
* processes.c (CreateProcess): Add a reference to the child
        process' handle, so it won't be destroyed if this process closes
        its copy of the handle.  Fixes bug 77393.
        
        * processes.c (process_set_current): Fall through to creating a
        new one if the handle lookup fails.

        * processes.c (_wapi_process_signal_self):
        * handles.c (handle_cleanup): The process is exiting, so set the
        handle state for this process to signalled.  This should let other
        non-related processes wait for this handle.
        
        * handles.c (_wapi_search_handle): Don't search shared handles in
        all cases.

        * collection.c (collection_thread): No need to do a collection
        scan straight away, do the waiting first.



svn path=/branches/mono-1-1-13/mono/; revision=59119
2006-04-06 15:10:40 +00:00
Dick Porter a19a5709bc 2006-04-06 Dick Porter <[email protected]>
* shared.c: Fix parameters in semctl () call.

2006-04-06  Dick Porter  <[email protected]>

        * semdel.c (main): Fix parameters in semctl () call.



svn path=/branches/mono-1-1-13/mono/; revision=59110
2006-04-06 11:29:06 +00:00
Atsushi Eno ef6cea997b merge r59061.
svn path=/branches/mono-1-1-13/mcs/; revision=59062
2006-04-05 13:49:36 +00:00
Wade Berrier 88be7c96a7 Merge 58871 and 58872 from trunk (Fix build on pre glib 2.4 systems)
svn path=/branches/mono-1-1-13/mono/; revision=59036
2006-04-04 19:19:02 +00:00
Chris Toshok 74c3a8c112 In Test/System.Net:
2006-04-03  Chris Toshok  <[email protected]>

	* HttpWebRequestTest.cs (Missing_ContentEncoding): add test to
	handle missing content encoding header.

In System.Net:
2006-04-03  Chris Toshok  <[email protected]>

	* HttpWebResponse.cs (ContentEncoding): return "" if the header
	isn't present.


svn path=/branches/mono-1-1-13/mcs/; revision=58979
2006-04-03 21:37:24 +00:00
Chris Toshok 856e68fd90 backport 77991 fix
svn path=/branches/mono-1-1-13/mcs/; revision=58923
2006-04-03 02:19:00 +00:00
Zoltan Varga 8eabc21395 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=58898
2006-04-01 19:24:51 +00:00
Zoltan Varga a4d7c2655a Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=58860
2006-03-31 20:36:22 +00:00
Zoltan Varga ae72fc0da8 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=58859
2006-03-31 20:35:23 +00:00
Zoltan Varga 2122061e26 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=58845
2006-03-31 14:03:31 +00:00
Zoltan Varga ffecdce498 Merge r55475 from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=58842
2006-03-31 13:38:54 +00:00
Zoltan Varga f7c746f66c Merge r55475 from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=58841
2006-03-31 13:38:31 +00:00
Robert Jordan c00ad8fdf0 Backported from HEAD r58763
svn path=/branches/mono-1-1-13/mcs/; revision=58764
2006-03-29 21:46:38 +00:00
Vladimir Krasnov 7a53a348d6 * RepeatInfo.cs: fixed RenderBeginTag to set enabled value of table when rendering disabled list control
svn path=/branches/mono-1-1-13/mcs/; revision=58692
2006-03-29 08:59:56 +00:00
Pete Johanson 270274af4b Merge r57937 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=58689
2006-03-29 07:03:43 +00:00
Atsushi Eno 3316901644 merge r58687 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=58688
2006-03-29 02:02:21 +00:00
Gonzalo Paniagua Javier ac19ad3462 2006-03-28 Gonzalo Paniagua Javier <[email protected]>
* Panel.cs: render the image url inside 'url()'. Fixes bug #77811.


svn path=/branches/mono-1-1-13/mcs/; revision=58659
2006-03-28 16:41:31 +00:00
Gonzalo Paniagua Javier 87d476e45d 2006-03-27 Gonzalo Paniagua Javier <[email protected]>
* HttpUtilityTest.cs: test from bug #77931.


svn path=/branches/mono-1-1-13/mcs/; revision=58628
2006-03-27 23:01:01 +00:00
Gonzalo Paniagua Javier 8d08cdd022 2006-03-27 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: UrlDecode does not throw if an hexadecimal sequence
	fails to parse as an integer. Fixes bug #77931.


svn path=/branches/mono-1-1-13/mcs/; revision=58626
2006-03-27 22:59:15 +00:00
Wade Berrier 33ab4bee8e pull from trunk (2 of 2)
svn path=/branches/mono-1-1-13/mcs/; revision=58604
2006-03-27 17:39:11 +00:00
Wade Berrier a2109761eb pull from trunk
svn path=/branches/mono-1-1-13/mcs/; revision=58603
2006-03-27 17:38:28 +00:00
Wade Berrier d53245a320 version bump for tag
svn path=/branches/mono-1-1-13/mono/; revision=58601
2006-03-27 17:36:21 +00:00
Dick Porter 8c790fafba 2006-03-27 Dick Porter <[email protected]>
* shared.c (_wapi_shm_file_open): Break out of a loop if the
        shared file is smaller than expected.  (We loop a few times in
        case another process is in the middle of creating the file.)



svn path=/branches/mono-1-1-13/mono/; revision=58563
2006-03-27 09:28:30 +00:00
Atsushi Eno 83c7cd8837 merged bugfix part of r58557 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=58558
2006-03-26 23:38:04 +00:00
Miguel de Icaza 5555a9e8da Add mono/metadata/debug-helpers.h include file to remove warning
svn path=/branches/mono-1-1-13/mono/; revision=58525
2006-03-25 17:39:40 +00:00
Zoltan Varga 725e5ee542 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=58510
2006-03-25 00:00:02 +00:00
Zoltan Varga dbda238384 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=58507
2006-03-24 23:56:32 +00:00
Gonzalo Paniagua Javier f4da527d13 from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=58474
2006-03-24 18:26:24 +00:00
Gonzalo Paniagua Javier 68b3f88746 from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=58473
2006-03-24 18:23:46 +00:00
Gonzalo Paniagua Javier c7675455e5 from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=58472
2006-03-24 18:18:01 +00:00
Wade Berrier 97de966994 version bump
svn path=/branches/mono-1-1-13/mono/; revision=58467
2006-03-24 17:58:25 +00:00
Gonzalo Paniagua Javier 4b5ed2d045 2006-03-22 Gonzalo Paniagua Javier <[email protected]>
* icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
	bug #77877.


svn path=/branches/mono-1-1-13/mono/; revision=58461
2006-03-24 17:52:11 +00:00
Wade Berrier f66121b743 pull from trunk for 1.1.13.5 tag
svn path=/branches/mono-1-1-13/mcs/; revision=58460
2006-03-24 17:51:31 +00:00
Wade Berrier 65b4a3bd6f pull from trunk for 1.1.13.5 tag
svn path=/branches/mono-1-1-13/mcs/; revision=58459
2006-03-24 17:50:44 +00:00
Dick Porter 657e0eccdb 2006-03-24 Dick Porter <[email protected]>
* file-io.c (get_file_attributes): More stat macro breakage.
        Fixes bug 77759.



svn path=/branches/mono-1-1-13/mono/; revision=58447
2006-03-24 16:50:25 +00:00
Dick Porter de63c87ee8 2006-03-22 Dick Porter <[email protected]>
* handles.c:
	* wapi-private.h:
	* shared.h:
	* shared.c: Delete the semaphores and shared files when the last
	process has finished with them


svn path=/branches/mono-1-1-13/mono/; revision=58432
2006-03-24 16:37:02 +00:00
Atsushi Eno 913af938cd merged 58354 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=58355
2006-03-23 13:11:37 +00:00
Gonzalo Paniagua Javier 41ea134fc8 2006-03-22 Gonzalo Paniagua Javier <[email protected]>
* icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
	bug #77877.


svn path=/branches/mono-1-1-13/mono/; revision=58329
2006-03-22 23:00:08 +00:00
Robert Jordan 1a7e9406c3 Backported from HEAD r58322.
svn path=/branches/mono-1-1-13/mcs/; revision=58323
2006-03-22 21:32:38 +00:00
Senganal T 36ca6b5233 2006-03-20 Senganal T <[email protected]>
* System.Data.Common/DataAdapter.cs :
		- Ctor () : Set Default Values for DataAdapter members
	* System.Data.Common/DbDataAdapter.cs : 
		- Update () : Call row.AcceptChanges only if AcceptChangesDuringUpdate
		is true. Fixes bug #77776


svn path=/branches/mono-1-1-13/mcs/; revision=58286
2006-03-22 08:56:32 +00:00
Gonzalo Paniagua Javier de5361b208 2006-03-21 Gonzalo Paniagua Javier <[email protected]>
* FileStreamTest.cs: new test from bug #77863.


svn path=/branches/mono-1-1-13/mcs/; revision=58253
2006-03-21 21:15:23 +00:00
Gonzalo Paniagua Javier 68ebbeaf31 2006-03-21 Gonzalo Paniagua Javier <[email protected]>
* FileStream.cs: Seek() should flush the buffer, if any. Fixes bug
	#77863.


svn path=/branches/mono-1-1-13/mcs/; revision=58252
2006-03-21 21:13:45 +00:00
Martin Baulig 9b7ad4ac3c gtest-261.cs breaks due to a missing runtime bug fix.
svn path=/branches/mono-1-1-13/mcs/; revision=58239
2006-03-21 18:40:23 +00:00
Martin Baulig be7a096eda **** Merged r58233 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=58236
2006-03-21 18:14:23 +00:00
Martin Baulig f0b605439a **** Merged r58071-58072 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=58235
2006-03-21 18:12:46 +00:00
Martin Baulig 11545a3a39 **** Merged r57879 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=58234
2006-03-21 18:09:57 +00:00
Lluis Sanchez eb3af332ab 2006-03-21 Lluis Sanchez Gual <[email protected]>
* System.Xml.Serialization/XmlTypeMapMemberElement.cs: When
	looking for the correct element definition for a member,
	based on the value type, take into account subypes of the
	declared types. Fixes bug #77447.


svn path=/branches/mono-1-1-13/mcs/; revision=58215
2006-03-21 11:31:17 +00:00
Miguel de Icaza d3828c409d 2006-03-20 Miguel de Icaza <[email protected]>
* CsprojInfo.cs: Handle spaces and () in filenames


svn path=/branches/mono-1-1-13/mcs/; revision=58198
2006-03-20 20:02:04 +00:00
Paolo Molaro b385ef4cf4 Backported LocalDataStoreSlot fix.
svn path=/branches/mono-1-1-13/mcs/; revision=58186
2006-03-20 14:31:59 +00:00
Paolo Molaro 07023561dc Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <[email protected]>
* icall.c, threads-types.h, threads.c: implemented finalizer for
	LocalDataStoreSlot.


svn path=/branches/mono-1-1-13/mono/; revision=58182
2006-03-20 13:55:11 +00:00
Zoltan Varga 81b2c25fbf Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=58166
2006-03-19 19:24:09 +00:00
Vladimir Krasnov 07815a88dd merge from 58162
* HtmlAnchor.cs: fixed RenderAttributes, if target attribute is empty it shouldn't be rendered
* HtmlForm.cs: fixed Method, default method "post" should be added if its value null or empty string
* HtmlInputImage.cs: fixed SetAtt, it removes attributes if it has null value, the fix is to remove attributes with empty string value too

svn path=/branches/mono-1-1-13/mcs/; revision=58164
2006-03-19 17:32:31 +00:00
Zoltan Varga b258652e87 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=58163
2006-03-19 17:17:56 +00:00
Robert Jordan c96c4c2fbe Backport from HEAD r58152:58153
svn path=/branches/mono-1-1-13/mcs/; revision=58154
2006-03-19 15:18:57 +00:00
Gonzalo Paniagua Javier 913c0b93b0 2006-03-18 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: fix upper bound when iterating through the module
	collection.


svn path=/branches/mono-1-1-13/mcs/; revision=58148
2006-03-18 21:35:10 +00:00
Paolo Molaro b240d7c0b8 Fix compilation for older compilers.
svn path=/branches/mono-1-1-13/mono/; revision=58125
2006-03-17 19:53:58 +00:00
Raja R Harinath 19e7b45e6a Backported revisions from trunk: 56668, 57463
svn path=/branches/mono-1-1-13/mcs/; revision=58105
2006-03-17 09:35:04 +00:00
Raja R Harinath 6129749f32 remove svn:executable, set svn:eol-style=native
svn path=/branches/mono-1-1-13/mcs/; revision=58104
2006-03-17 08:59:55 +00:00
Sebastien Pouliot 1e9d7e2d8d In Mono.Security.Protocol.Tls:
2006-03-16  Sebastien Pouliot  <[email protected]>
	* CipherSuiteFactory.cs: Fix bad key exchange values for non-export
	cihpers. Most certificates have "too much" usages by default so this
	was hidden from view.
In Mono.Security.Protocol.Tls.Handshake.Client:

svn path=/branches/mono-1-1-13/mcs/; revision=58099
2006-03-17 02:41:40 +00:00
Sebastien Pouliot 258623f1ca 2006-03-16 Sebastien Pouliot <[email protected]>
* TlsServerCertificate.cs: Relax (again) the KeyUsageExtension check
	as it is possible that the certificate usage and the negotiated cipher
	could be not perfectly aligned.


svn path=/branches/mono-1-1-13/mcs/; revision=58098
2006-03-17 02:12:19 +00:00
Gonzalo Paniagua Javier 834a2895db 2006-03-15 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: allow setting a Cache-Control header through
	AppendHeader. Fixes bug #77775.


svn path=/branches/mono-1-1-13/mcs/; revision=58095
2006-03-16 23:57:49 +00:00
Sebastien Pouliot fb8af09b10 2006-03-16 Sebastien Pouliot <[email protected]>
* SslStreamBase.cs: Safety net. Throw an exception if we're waiting 
	for more than five (5) minutes for an async read or write to complete.


svn path=/branches/mono-1-1-13/mcs/; revision=58088
2006-03-16 20:19:56 +00:00
Ankit Jain ac26c355db In class/corlib/System.Collections.Generic:
* List.cs (CheckIndex): Check for -ve indices and allow index == size.
	(Insert): Use CheckIndex.

In class/corlib/Test/System.Collections.Generic:

	* ListTest.cs: Add some tests for InsertRange.

svn path=/branches/mono-1-1-13/mcs/; revision=58085
2006-03-16 19:31:35 +00:00
Gonzalo Paniagua Javier 555ad45798 2006-03-16 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: avoid Begin/EndWrite when the body length is
	zero.


svn path=/branches/mono-1-1-13/mcs/; revision=58083
2006-03-16 19:25:07 +00:00
Sebastien Pouliot 40814fb083 missing file from previous commits
svn path=/branches/mono-1-1-13/mcs/; revision=58081
2006-03-16 19:05:11 +00:00
Sebastien Pouliot e2ea562360 forgot to update the sources file
svn path=/branches/mono-1-1-13/mcs/; revision=58073
2006-03-16 17:56:52 +00:00
Atsushi Eno fc3a9636af merge from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=58070
2006-03-16 17:10:33 +00:00
Sebastien Pouliot dc767a4ad5 In Mono.Security.Protocol.Tls:
2006-03-16  Sebastien Pouliot  <[email protected]>

	* ClientSessionCache.cs: New. Handle a client-side session cache to 
	enable the use of abbreviated handshake whenever possible. This will
	reduce the number of negotiation (a very CPU intensive process) done
	with the same host.
	* Context.cs: Add a property for AbbreviatedHandshake.
	* RecordProtocol.cs: Don't send Finished record from ChangeCipherSpec
	as this won't work if the message flow change.
	* SslClientStream.cs: Line endings.
	* SslServerStream.cs: Throw an exception if ReceiveRecord return null
	or an empty buffer (i.e. communication ended with client). Fix #76254.
	* SslStreamBase.cs: Re-add synchronous implementations for Read and 
	Write.
	* TlsCipherSuite.cs: Update the client-side session cache with the 
	mastersecret.
	* TlsStream.cs: Avoid possible buffer underun reading bytes (found by
	Gonzalo).

  
       * SslStreamBase.cs: Re-implemented the synchronous versions of Read
       and Write methods so they don't use the async code.
In Mono.Security.Protocol.Tls.Handshake.Client:
2006-03-16  Sebastien Pouliot  <[email protected]>

	* TlsClientHello.cs: Check to see if we already have a known session
	(past or concurrent) with the same target host. If so the use this
	session id to try to resume (i.e. abbreviated handshake).
	* TlsServerFinished.cs: Don't reset the hasndshake stream here. The 
	stream must be resetted once BOTH the client and the server are done.
	The order of message can be different if we use an abbreviated 
	handshake sequence which leads to an invalid handshake.
	* TlsServerHello.cs: Add this session info to the client cache. If the
	server sends the same session id (as we supplied) then we MUST do an 
	abbreviated handshake.


svn path=/branches/mono-1-1-13/mcs/; revision=58063
2006-03-16 15:25:35 +00:00
Senganal T 5b491ef732 In Mono.Data.Tds/Mono.Data.Tds.Protocol:
2006-03-08  Senganal T  <[email protected]>

	* Tds70.cs :
		- ProcessColumnInfo () : Set IsAutoIncrement Value for the column.

In System.Data/Test/System.Data/schemas:
2006-01-16  Senganal T <[email protected]>

	* test015.xsd, test016.xsd : added 
		- test ForeignKeyConstraint and annotated DataRelation 
		relating multiple columns

In System.Data/Test/System.Data:
2006-03-09  Senganal T  <[email protected]>
	
	* DataRowCollectionTest2.cs :
	* DataTableTest2.cs : 
		- Fixed NotWorking tests.

2006-03-07  Senganal T  <[email protected]>

	* DataRowCollectionTest2.cs :
	* DataTableTest2.cs :
		- Added failing testcases as NotWorking tests.

2006-03-05  Senganal T  <[email protected]>
 
	* DataSetTest2.cs
	* ConstraintCollectionTest2.cs
	* DataViewTest.cs
	* DataRelationTest.cs
 		Added testcases for BeginInit and EndInit methods

2006-02-22  Senganal T  <[email protected]>

 	* DataRowCollectionTest2.cs : Check if index is maintained for row on calling RejectChanges. 
 	* DataTableTest2.cs : Check if data is loaded and merged (if key exists) correctly.
 	* ForeignKeyConstraintTest.cs : Check if a ParentColumn value can be modified
 		when the row is in 'Added' State. Also, check if child col values are
 		updated correctly.
 
2006-02-16  Senganal T  <[email protected]>

	* DataSetTest2.cs :
		- WriteXmlSchema_ForeignKeyConstraint : testcase for bug #77557
		- WriteXmlSchema_RelationAnnotation :
		- WriteXmlSchema_Relations_ForeignKeys :
			ensure Relations and ForeignKeyConstraints are written and read correctly.
	* DataSetReadXmlSchema.cs :
		- ReadConstraints :
			verify reading a foreignkeyconstraint doesent create a relation.
		- ReadAnnotatedRelations_MultipleColumns :
			verify multiple columns are read correctly if part of annotated relation.

In System.Data/Test/ProviderTests/ProviderIndependant:
2006-03-08  Senganal T  <[email protected]>

 	* DataReaderTest : Added a test to verify if AutoIncrement
 	value is set in the SchemaTable.
 
In System.Data/Test/ProviderTests/System.Data.SqlClient:
2006-03-08  Senganal T  <[email protected]>

	* SqlCommandBuilderTest.cs :
		- Added testcase to verify UpdateCommand created with AutoIncrement
		columns.

	* SqlAdapterTest.cs : Added testcases for verifying FillError Behavior

2006-02-13  Senganal T  <[email protected]>

In System.Data/System.Data.Common:
2006-03-09  Senganal T <[email protected]>
	
	* Index.cs :
		- Update () : Add the new record in the correct position

2006-03-07  Senganal T <[email protected]>

	* Key.cs : 
		Reverted the changes from the earlier patch.

2006-02-22  Senganal T <[email protected]>

 	* DbDataAdapter.cs :
 		- FillTable : Move BeginLoadData, EndLoadData outside the loop. Also,
 		move EndLoadData outsidet try,catch block. FillError is only for errors
 		occuring during loading the data into datatable.
 	* Key.cs :
 		- Set Default value of RowStateFilter to (CurrentRos | OriginalRows).
 		- ContainsVersion : If RowStateFilter is set to default value, return true
 		for Modified Rows as they can contain Default/Original versions.

In System.Data/System.Data:
2006-03-09  Senganal T  <[email protected]>

	* DataRow.cs :
		- RejectChanges () :  Add the row to index, if it was in deleted state and
		Update the index if in Modified State.
		- AcceptChanges () : Do not update the Indexes.
		- EndEdit () : Update the indexes even if BeginLoadData has been called
		on the table. Ideally, indexes should not be maintained during DataLoad,
		but this needs to handled in multiple places correctly. For now, just maintain
		the index to ensure correct operation.
	
2006-03-05  Senganal T  <[email protected]>

 	* DataSet.cs :
 		- BeginInit (), EndInit () : Implemented methods
 		- InitInProgress : Added.
 	* DataTable.cs
 		- EndInit () : Move the adding of columns and constraints
 		to FinishInit.
 		- FinishInit () : Added. Adds the Constraints and Columns
 		to the collection.
 		- InitInProgress : Added.
 	* Constraint.cs
 		- FinishInit () : Added. Virtual method
 		- InitInProgress : Added. Virtual property
 	* UniqueConstraint.cs
 	* ForeignKeyConstraint.cs
 		- FinishInit () : Added.
 		- InitInProgress : Added.
 		- DataColsNotValidated : Removed.
 	* ConstraintCollection.cs
 		- PostAddRange : Removed event
 		- PostEndEdit () : Renamed to PostAddRange
 		- Add () : Simplified the testing if constraint is initialized
 		- AddRange () : Simplified initializing the constraints
 	* DataTableCollection.cs
 		- PostAddRange () : Added. Adds the tables to the collection
 	* DataColumnColletion.cs
 		- PostEndInit () : Renamed to PostAddRange.Also, add column to
 		the collection only if not null.
 
 	Added/Implemented methods for design time support. Renamed some methods for consistency
 	in naming across classes for methods serving the same purpose. 

2006-02-22  Senganal T  <[email protected]>

 	* DataRow.cs 
 		- RejectChanges : Do not remove Row from Indexes when state is Deleted.
 		- CheckChildRows : When checking for the ChildRows, use the current value
 		and not the original value.

2006-02-16  Senganal T  <[email protected]>

 	* XmlSchemaWriter :
 		WriteDataSetElement : Add an annotation element if exists.
 		WriteDataRelationAnnotation : New. Write a DataRelation as an annotation.
 		WriteConstraints : Write ForeignKeyConstraint even when not associated with
 			a DataRelation and add a "ConstraintOnly=true" attribute for such constraints.
 	* XmlConstants.cs : Add a new constant - ConstraintOnly
 	* XmlSchemaImporter.cs :
 		- ConstraintStructure : Add field ,IsConstraintOnly, to distinguish if a foreignkeyconstraint
 			is related to relation or not.
 		- GenerateRelation : Handle the case when parentkey and childkey contain multiple columnnames.


Backporting patches r56947, r56149, r57590, r57653, r57689, r57725

svn path=/branches/mono-1-1-13/mcs/; revision=58062
2006-03-16 14:57:54 +00:00
Miguel de Icaza 5c2a908f2b We want JIT on s390 by default
svn path=/branches/mono-1-1-13/mono/; revision=58054
2006-03-16 00:00:44 +00:00
Gonzalo Paniagua Javier b6b27662a0 2006-03-15 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: allow setting a Cache-Control header through
	AppendHeader. Fixes bug #77775.


svn path=/branches/mono-1-1-13/mcs/; revision=58052
2006-03-15 23:57:54 +00:00
Gonzalo Paniagua Javier 6988ca987f from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=58048
2006-03-15 21:53:20 +00:00
Gonzalo Paniagua Javier 8cb49add59 2006-03-15 Gonzalo Paniagua Javier <[email protected]>
* CompareValidator.cs: when searching for the control to compare, use
	NamingContainer instead of Page. Fixes bug #77793.


svn path=/branches/mono-1-1-13/mcs/; revision=58045
2006-03-15 21:26:16 +00:00
Miguel de Icaza c8279c96a6 Patches from Neale Ferguson from trunk
svn path=/branches/mono-1-1-13/mono/; revision=58036
2006-03-15 19:13:48 +00:00
Dick Porter e4cae2b8f1 2006-03-15 Dick Porter <[email protected]>
* events.c: 
        * io.c: 
        * mutexes.c: 
        * processes.c: 
        * semaphores.c: 
        * sockets.c: 
        * threads.c: Explicitly initialise the handle ops struct



svn path=/branches/mono-1-1-13/mono/; revision=58007
2006-03-15 11:51:34 +00:00
Zoltan Varga c67b250955 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=57979
2006-03-14 22:27:49 +00:00
Dick Porter 9e05bb7f51 2006-03-14 Dick Porter <[email protected]>
* handles-private.h: 
        * wapi-private.h: 
        * wait.c: 
        * handles.c: Add a 'prewait' stage to the handle waiting, to give
        waiting threads a chance to check for bogus states before
        blocking.

        * mutexes.c (namedmutex_prewait): Use the prewait stage to check
        for named mutexes that have been abandoned in a locked state (eg
        if a process exited abnormally while owning the mutex) and
        override it if needed.



svn path=/branches/mono-1-1-13/mono/; revision=57958
2006-03-14 17:02:47 +00:00
Chris Toshok 9179cc9f6c 2006-03-14 Chris Toshok <[email protected]>
* Socket.cs (CheckProtocolSupport): remove the NET_2_0
	configuration stuff from here.


svn path=/branches/mono-1-1-13/mcs/; revision=57956
2006-03-14 16:28:38 +00:00
Miguel de Icaza 1a3e0aa7c3 Backport Atsushi's fix for #77767
svn path=/branches/mono-1-1-13/mcs/; revision=57953
2006-03-14 15:33:09 +00:00
Lluis Sanchez 7919626c17 2006-03-07 Lluis Sanchez Gual <[email protected]>
* XmlReflectionImporter.cs: Ignore the element namespace if
	  the schema form is set to Unqualified. Fixes bug #75019.



svn path=/branches/mono-1-1-13/mcs/; revision=57952
2006-03-14 15:30:27 +00:00
Robert Jordan 466b48f040 Backported from HEAD r57935.
svn path=/branches/mono-1-1-13/mcs/; revision=57936
2006-03-14 01:14:45 +00:00
Chris Toshok 7b324f7cc4 2006-03-13 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: revert r55809, as this change
	introduces a 2.0 configuration class, which 1.1.13 doesn't
	support.


svn path=/branches/mono-1-1-13/mono/; revision=57932
2006-03-14 00:27:23 +00:00
Gonzalo Paniagua Javier 03dd7dfe55 2006-03-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: send the request if ContentLength is set for
	POST/PUT, the request stream has that exact amount of bytes in it and
	we're trying to get the response stream.

	This way, closing the request stream is not needed in order to actually
	send the request. Fixes bug #77753.

	* WebConnectionStream.cs: throw if the number of bytes written is
	greater than the specified request content length.


svn path=/branches/mono-1-1-13/mcs/; revision=57921
2006-03-13 22:59:47 +00:00
Gonzalo Paniagua Javier a669562921 2006-03-13 Gonzalo Paniagua Javier <[email protected]>
* ListBox.cs:
	(RenderContents): don't call base.RenderContents. Fixes bug #77740.
	Patch by Hubert Fongarnand.


svn path=/branches/mono-1-1-13/mcs/; revision=57906
2006-03-13 20:57:49 +00:00
Senganal T 95738e6bd1 2006-03-13 Senganal T <[email protected]>
* System.Data.OracleClient.Oci/OciStatementHandle.cs : Get StatementType as a ushort value.
	* System.Data.OracleClient.Oci/OciParameterDescriptor.cs : Get DataType as a ushort value.


svn path=/branches/mono-1-1-13/mcs/; revision=57888
2006-03-13 05:04:53 +00:00
Miguel de Icaza 959812631d 2006-03-12 Robert Jordan <[email protected]>
* UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug #77772

svn path=/branches/mono-1-1-13/mcs/; revision=57880
2006-03-12 20:58:06 +00:00
Zoltan Varga 771bd09733 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57878
2006-03-12 18:35:04 +00:00
Zoltan Varga 711458f128 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57875
2006-03-12 18:04:34 +00:00
Joshua Tauberer e61539e181 Merge from trunk 56756:HEAD to Mono.Data.SqliteClient. Fixes Sqlite2 encoding issue (back to UTF-8 default encoding like it was before Jan 20) and a bug about nulls.
svn path=/branches/mono-1-1-13/mcs/; revision=57841
2006-03-11 21:11:32 +00:00
Zoltan Varga b835f803d7 Revert r57743. CodeDomSerializerException is already there, just in a different assembly :(.
svn path=/branches/mono-1-1-13/mcs/; revision=57776
2006-03-10 14:07:31 +00:00
Zoltan Varga e7de0a293e Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57753
2006-03-09 23:30:57 +00:00
Zoltan Varga 83e056e3af Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57745
2006-03-09 19:25:25 +00:00
Zoltan Varga b1a6b65b0c Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57743
2006-03-09 19:17:17 +00:00
Zoltan Varga 702670dae2 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=57739
2006-03-09 18:34:01 +00:00
Dick Porter 9abe11df7e 2006-03-09 Dick Porter <[email protected]>
* file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
        Fixes bug 76966 again.



svn path=/branches/mono-1-1-13/mono/; revision=57728
2006-03-09 14:27:08 +00:00
Martin Baulig 7373f9c6ef 2006-03-09 Martin Baulig <[email protected]>
* Mono.C5/: Copy from HEAD.


svn path=/branches/mono-1-1-13/mcs/; revision=57722
2006-03-09 11:46:13 +00:00
Martin Baulig 1520c89bc5 Remove in preparation for the re-import.
svn path=/branches/mono-1-1-13/mcs/; revision=57721
2006-03-09 11:44:15 +00:00
Martin Baulig 474016bfed **** Merged r57646, r57658 and r57715 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=57720
2006-03-09 11:06:39 +00:00
Martin Baulig 69f6e89d46 **** Merged r57647-r57648 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=57718
2006-03-09 11:03:23 +00:00
Sebastien Pouliot db8d2847c3 2006-03-08 Sebastien Pouliot <[email protected]>
* SslStreamBase.cs: Re-implemented the synchronous versions of Read 
	and Write methods so they don't use the async code.


svn path=/branches/mono-1-1-13/mcs/; revision=57712
2006-03-08 23:50:12 +00:00
Miguel de Icaza e16d227349 Update
svn path=/branches/mono-1-1-13/mono/; revision=57700
2006-03-08 17:09:58 +00:00
Gonzalo Paniagua Javier 6997df4666 this is not an exe
svn path=/branches/mono-1-1-13/mcs/; revision=57696
2006-03-08 16:46:26 +00:00
Gonzalo Paniagua Javier f24df964dd 2006-03-07 Gonzalo Paniagua Javier <[email protected]>
* SslStreamBase.cs: avoid creating the ManualResetEvent whenever
	possible. Don't lock on an instance of an object that the user can get.


svn path=/branches/mono-1-1-13/mcs/; revision=57664
2006-03-07 20:09:57 +00:00
Martin Baulig 982b07d69f **** Merged r57639 from MCS ****
svn path=/branches/mono-1-1-13/mcs/; revision=57641
2006-03-07 01:02:09 +00:00
Martin Baulig 4584a80c06 **** Merged r57608 from MCS ****
svn path=/branches/mono-1-1-13/mcs/; revision=57640
2006-03-07 01:00:28 +00:00
Gonzalo Paniagua Javier 6d22ef9d36 2006-03-06 Gonzalo Paniagua Javier <[email protected]>
* RecordProtocol.cs: avoid creating the ManualResetEvent whenever
	possible. Don't lock on an instance of an object that the user can get.


svn path=/branches/mono-1-1-13/mcs/; revision=57633
2006-03-06 19:37:38 +00:00
Miguel de Icaza ed53aa4997 Change the prefix/suffix for the OCI/Oracle library
svn path=/branches/mono-1-1-13/mono/; revision=57632
2006-03-06 19:32:34 +00:00
Zoltan Varga f3cf39af02 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=57623
2006-03-06 18:20:48 +00:00
Zoltan Varga 44be4f3208 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=57579
2006-03-04 12:56:33 +00:00
Martin Baulig d1131caf35 **** Merged r57571-r57573 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=57577
2006-03-04 04:46:36 +00:00
Martin Baulig b56c531e5c **** Merged r57570 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=57576
2006-03-04 04:41:40 +00:00
Martin Baulig ab050ec219 **** Merged r57567 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=57569
2006-03-04 02:31:46 +00:00
Dick Porter 52ab6d7469 2006-03-03 Dick Porter <[email protected]>
* UdpClient.cs: Fix IPv6 family check.  Fixes bug 77689.


svn path=/branches/mono-1-1-13/mcs/; revision=57549
2006-03-03 17:17:38 +00:00
Dick Porter 2bcebde4e5 2006-03-03 Dick Porter <[email protected]>
* processes.c (ShellExecuteEx): Cope when some of the parameters
        are NULL.

2006-03-03  Dick Porter  <[email protected]>

        * process.c
        (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
        Check parameters before dereferencing them.  Fixes Aaron's part of
        bug 77393.



svn path=/branches/mono-1-1-13/mono/; revision=57544
2006-03-03 16:05:04 +00:00
Dick Porter d7b5ca8cba 2006-03-03 Dick Porter <[email protected]>
* Process.cs: Close redirected pipes on errors.  Fixes bug 77514.



svn path=/branches/mono-1-1-13/mcs/; revision=57541
2006-03-03 15:21:50 +00:00
Atsushi Eno c0743ce61c 2006-03-03 Atsushi Enomoto <[email protected]>
* NvdlSimplified.cs : (SimpleRules) huh, I made silly change to
	  access null field.


svn path=/branches/mono-1-1-13/mcs/; revision=57530
2006-03-03 02:52:49 +00:00
Zoltan Varga d80218ee0b Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=57521
2006-03-02 20:49:55 +00:00
Sebastien Pouliot bb248bba8f 2006-03-02 Sebastien Pouliot <[email protected]>
* RecordProtocol.cs: Fix possible endless loop (#77663). Remove hack
	for an old, fixed, MCS bug (#67711).


svn path=/branches/mono-1-1-13/mcs/; revision=57509
2006-03-02 18:17:52 +00:00
Paolo Molaro 0504bb6ca4 Thu Mar 2 10:38:33 CET 2006 Paolo Molaro <[email protected]>
* icall.c: backport memory corruption fix.


svn path=/branches/mono-1-1-13/mono/; revision=57498
2006-03-02 09:39:08 +00:00
Atsushi Eno 257c04b1a7 merged r57481 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=57494
2006-03-02 02:45:24 +00:00
Robert Jordan f7be2a173e Backport from HEAD r56093, r=miguel
svn path=/branches/mono-1-1-13/mcs/; revision=57488
2006-03-01 21:26:09 +00:00
Robert Jordan 7adb1866be Backport from HEAD r55598, r=miguel
svn path=/branches/mono-1-1-13/mcs/; revision=57487
2006-03-01 21:24:24 +00:00
Miguel de Icaza e522ebee4a Backport
svn path=/branches/mono-1-1-13/mcs/; revision=57478
2006-03-01 19:18:39 +00:00
Miguel de Icaza b4664bede5 Backport
svn path=/branches/mono-1-1-13/mono/; revision=57476
2006-03-01 19:18:03 +00:00
Wade Berrier fbc561d17c bump for 1.1.13.4
svn path=/branches/mono-1-1-13/mono/; revision=57441
2006-02-28 22:58:04 +00:00
Gonzalo Paniagua Javier e8f9d0f95a r56161 from head
svn path=/branches/mono-1-1-13/mono/; revision=57435
2006-02-28 21:40:12 +00:00
Gonzalo Paniagua Javier f06574fe5b r57039,57238 from HEAD
svn path=/branches/mono-1-1-13/mono/; revision=57432
2006-02-28 21:27:06 +00:00
Gonzalo Paniagua Javier e463e29e0a r57037 from HEAD
svn path=/branches/mono-1-1-13/mono/; revision=57430
2006-02-28 21:12:34 +00:00
Wade Berrier 9334918613 pull in changes from trunk
svn path=/branches/mono-1-1-13/mcs/; revision=57423
2006-02-28 20:08:50 +00:00
Wade Berrier 195be47f2f pull in changes from trunk
svn path=/branches/mono-1-1-13/mcs/; revision=57422
2006-02-28 20:08:17 +00:00
Gonzalo Paniagua Javier 457bb1f247 2006-02-28 Gonzalo Paniagua Javier <[email protected]>
* file-io.c: fix typo in warning message.


svn path=/branches/mono-1-1-13/mono/; revision=57409
2006-02-28 18:14:03 +00:00
Paolo Molaro f5b438a51d Backport pinvoke lookup change.
svn path=/branches/mono-1-1-13/mono/; revision=57404
2006-02-28 16:50:17 +00:00
Paolo Molaro 9937117115 Backported "init running on non-main thread" fix.
svn path=/branches/mono-1-1-13/mono/; revision=57398
2006-02-28 16:15:15 +00:00
Paolo Molaro 4ba996de38 Tls writable text fix backport.
svn path=/branches/mono-1-1-13/mono/; revision=57396
2006-02-28 16:08:28 +00:00
Paolo Molaro ed6334ae35 Generics valuetype corruption fix backport.
svn path=/branches/mono-1-1-13/mono/; revision=57393
2006-02-28 15:52:44 +00:00
Sebastien Pouliot c08a2cd9b3 2006-02-28 Sebastien Pouliot <[email protected]>
* CryptoConvert.cs: Make sure we can import a keypair into our RSA 
	instance (even if the key store isn't available). See bug #77559.
	* PKCS8.cs: Make sure we can import a keypair into our RSA instance
	(even if the key store isn't available). See bug #77559.


svn path=/branches/mono-1-1-13/mcs/; revision=57392
2006-02-28 14:59:26 +00:00
Gonzalo Paniagua Javier e5f26d3004 from head
svn path=/branches/mono-1-1-13/mono/; revision=57365
2006-02-28 01:18:44 +00:00
Gonzalo Paniagua Javier c3733aa980 backport of the thread dump code by Zoltan
svn path=/branches/mono-1-1-13/mono/; revision=57364
2006-02-28 01:14:37 +00:00
Wade Berrier 53c61e76ed copy trunk changes into 1.1.13 branch
svn path=/branches/mono-1-1-13/mcs/; revision=57345
2006-02-27 19:05:11 +00:00
Wade Berrier 5829e96050 copy trunk changes into 1.1.13 branch
svn path=/branches/mono-1-1-13/mcs/; revision=57344
2006-02-27 19:03:36 +00:00
Dick Porter 5da1119d76 2006-02-27 Dick Porter <[email protected]>
* mutexes.c: 
        * mono-mutex.c: 
        * threads.c: Comparing pthread_t with == is not portable, so use
        pthread_equal().



svn path=/branches/mono-1-1-13/mono/; revision=57332
2006-02-27 16:45:05 +00:00
Dick Porter 0a175bf1a4 Thu Feb 23 18:47:20 GMT 2006 Paolo Molaro <[email protected]>
* *.h, *.h: patch from Dick to make Linuxthreads systems work again.



svn path=/branches/mono-1-1-13/mono/; revision=57326
2006-02-27 14:50:52 +00:00
Gonzalo Paniagua Javier 088c7334ba 2006-02-24 Gonzalo Paniagua Javier <[email protected]>
* configure.in: define PLATFORM_BSD.


svn path=/branches/mono-1-1-13/mono/; revision=57261
2006-02-24 19:44:40 +00:00
Gonzalo Paniagua Javier c2c1b1fcfd 2006-02-24 Gonzalo Paniagua Javier <[email protected]>
* threadpool.c: for asynchronous connect(), enable the same workaround
	for BSD 6 as for the Mac. Fixes bug #77637.


svn path=/branches/mono-1-1-13/mono/; revision=57260
2006-02-24 19:44:06 +00:00
Gonzalo Paniagua Javier 38324a0f52 forgot this
svn path=/branches/mono-1-1-13/mono/; revision=57259
2006-02-24 19:42:12 +00:00
Senganal T cd1a3ac098 2006-02-24 Senganal T <[email protected]>
* Test/System.Data/ConstraintCollectionTest2.cs : added testcase for #77630
	* System.Data/UniqueConstraint.cs :
		- ChildConstraint : Added. Simplifies verifying if constraints are
		related.
		- CanRemoveFromCollection : Fixed the check to verify if constraints is
		linked to a ForeignKeyConstraint. Fixes #77630
	* System.Data/ForeignKeyConstraint.cs :
		- _validateRemoveParentConstraint : Removed. Not used anymore
		- ParentConstraint : Added. Simplifies verifying if constraints are
		related.


svn path=/branches/mono-1-1-13/mcs/; revision=57233
2006-02-24 08:29:01 +00:00
Gonzalo Paniagua Javier 4a7a7ab11b 2006-02-23 Gonzalo Paniagua Javier <[email protected]>
* TcpClient.cs: when the socket is not connected, don't try to set the
	socket options, as they are ignored on linux. Wait until Connect
	succeeds and then apply the options.


svn path=/branches/mono-1-1-13/mcs/; revision=57217
2006-02-23 21:32:09 +00:00
Paolo Molaro ea5801c624 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <[email protected]>
* mini-x86.c, mini-amd64.c: fix for case when xen support
	is disabled.


svn path=/branches/mono-1-1-13/mono/; revision=57204
2006-02-23 15:38:17 +00:00
Paolo Molaro baf743d89e Wed Feb 22 20:21:47 CET 2006 Paolo Molaro <[email protected]>
* mini-x86.c, mini-amd64.c: generate code to access tls items
	in a faster way for Xen systems.


svn path=/branches/mono-1-1-13/mono/; revision=57171
2006-02-22 19:22:57 +00:00
Dick Porter 58d7543806 Remove unused files
svn path=/branches/mono-1-1-13/mono/; revision=57163
2006-02-22 16:56:02 +00:00
Dick Porter f6b84806d7 2006-02-22 Dick Porter <[email protected]>
* thread-private.h: 
        * threads.c: There's no need to use the timed-thread support code
        any more, as we aren't using the timed join.  This greatly
        simplifies thread setup, and fixes a memory leak (bug 77521).

        Don't bother to store thread IDs in a hash table, use TLS instead.
        The one case that needs to look up the handle of a different
        thread (OpenThread()) can do the extra work itself.  Fixes bug
        77536.

        * handles.c (_wapi_search_handle): Add a reference when returning
        a private handle (shared handles are already reffed.)
        


svn path=/branches/mono-1-1-13/mono/; revision=57161
2006-02-22 16:24:47 +00:00
Ankit Jain 51ebd81dd9 In ilasm/tests:
* test-nonsealed-valueclass.il: New. Value class should be sealed.

In ilasm/codegen:
	* ExternTable.cs (ExternTable.GetTypeRef): Emit a warning if mscorlib is
	referenced without a corresponding '.assembly extern' directive. 
	* TypeDef.cs (TypeDef.Define): Valuetype class should be sealed. Emit
	warning if its not, and make it so.

In class/PEAPI:
	* Metadata.cs (TypeAttr): Add [Flags] attribute.


svn path=/branches/mono-1-1-13/mcs/; revision=57151
2006-02-22 10:22:42 +00:00
Zoltan Varga 9483519cfc Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=57106
2006-02-21 20:33:00 +00:00
Ankit Jain 456b542599 Backporting r57089 and r57090.
In mono/dis:
	* get.c (can_print_generic_param_name): Rename to ..
	(cant_print_generic_param_name): .. this, to match function name with behavior.

2006-02-21  Ankit Jain  <[email protected]>

	(can_print_generic_param_name): New. Check whether a MonoGenericParam has
In mono/metadata:
	* metadata.h (mono_metadata_decode_signed_value): Add declaration.

svn path=/branches/mono-1-1-13/mono/; revision=57093
2006-02-21 14:03:27 +00:00
Ankit Jain 520763b0a2 Backporting r57030 and r57084.
In mono/dis:
2006-02-21  Ankit Jain  <[email protected]>

	* get.c (mono_generic_params_with_ambiguous_names): New.
	(generic_containers): New. Hashtable of all generic containers that have
	been checked for ambiguous params.
	(check_ambiguous_genparams): New. Walk a MonoGenericContainer
	and fill mono_generic_params_with_ambiguous_names table.
	(is_ambiguous_generic_param): New. Check whether a MonoGenericParam has
	ambiguous names.
	(dis_stringify_type): Use new is_ambiguous_generic_param to determine
	whether to print number or name for VAR/MVAR.

2006-02-18  Raja R Harinath  <[email protected]>

	* get.c (get_typespec): Don't use mono_type_create_from_typespec_full().
	Use get_type() instead.
	(get_type): Add 'is_def' parameter.
	(get_field_signature, get_ret_type, get_param): Update.
	* dump.c (dump_table_property): Likewise.
	* get.h (get_type): Update prototype.

In mono/metadata:
2006-02-21  Ankit Jain  <[email protected]>

	* metadata.c (mono_metadata_load_generic_params): Move the code
	checking for ambiguous generic params from here to mono/dis/get.c
	* metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.


svn path=/branches/mono-1-1-13/mono/; revision=57087
2006-02-21 12:01:34 +00:00
Ankit Jain 71cf5a9be9 Backporting r56944.
In mono/dis:
2006-02-16  Raja R Harinath  <[email protected]>

	* get.c (get_typespec): Pass MonoGenericContainer to
	mono_type_create_from_typespec_full.
	(get_type): Likewise.
	* main.c (dis_code): Likewise.
	(dis_property_signature): Likewise.

In mono/metadata:
2006-02-16  Raja R Harinath  <[email protected]>
 
	Type metadata parsing doesn't use generic-instantiation information.
	* metadata.c (mono_metadata_parse_array_full): Change
	MonoGenericContext* parameter to MonoGenericContainer*.
	(mono_metadata_parse_type_full): Likewise.
	(mono_type_create_from_typespec_full): Likewise.
	(mono_metadata_parse_mh_full): Likewise.
	(mono_metadata_parse_generic_inst): Likewise.
	(do_mono_metadata_parse_generic_class): Likewise.
	(do_mono_metadata_parse_type): Likewise.
	* metadata-internals.h: Update to changes.
	* class.c (mono_class_find_enum_basetype): Likewise.
	(mono_class_setup_fields): Likewise.
	(mono_class_create_from_typespec): Likewise.
	* loader.c (method_from_methodspec): Likewise.
	(mono_get_method_from_token): Likewise.
	(mono_method_get_header): Likewise.


svn path=/branches/mono-1-1-13/mono/; revision=57085
2006-02-21 11:27:14 +00:00
Ankit Jain 5c4bba130e Backport r57063 & r57065.
In ilasm/tests:
	* generics-al.i, test-29.il: Remove. These use invalid style of
	specifying generic constraints.

In ilasm/codegen:
	* *.cs: Update all .cs files to use Report.Error instead of directly
	throwing an exception.
	* CodeGen.cs (CodeGen.ctor): Remove 'report' param, and the related
	field & property.

In ilasm:
	* Report.cs (Report): Make all methods,fields static.
	(Report.Error): Update to throw ILAsmException.
	(ILAsmException): New.
	(InternalErrorException): New. Derive from ILAsmException.
	* Driver.cs (Driver.Run): Catch ILAsmException and PEFileException and
	print error messages instead of dumping the stack trace, and delete the
	output file if CodeGen.Write() fails.
	Move the check for entrypoint from CodeGen.Write to here.

In ilasm/scanner:
	* ILTable.cs (directives): Remove .constraint

	* ILTokenizingException.cs (ILTokenizingException): Derive from
	ILAsmException.

In ilasm/parser:
	* ILParser.jay: Remove D_CONSTRAINT

	* ILParser.jay: Update to use Report.Error instead of directly throwing
	an exception.

In class/PEAPI:
	* PEAPI.cs (PEFileException): Update error message.
	* Metadata.cs: Update to throw PEFileException instead of Exception.     


svn path=/branches/mono-1-1-13/mcs/; revision=57066
2006-02-20 13:07:13 +00:00
Zoltan Varga 0ab2fad3a5 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57053
2006-02-19 18:12:00 +00:00
Ankit Jain 6119b81254 In ilasm/tests:
* invalid-method.il: New. Reference to undefined method.
	* invalid-field.il: New. Reference to undefined field.

In ilasm/codegen:
	* ExternTable.cs (ExternTable.GetModuleTypeRef): 'module_table' can be
	null.

	* CodeGen.cs (CodeGen.Write): Use only filename as the name of the
	module.
	* TypeDef.cs (TypeDef.ResolveAsMethodRef): New.
	(TypeDef.ResolveMethod): Change signature to take ret_type, params
	etc instead of a signature string. Also, if the method does not exist,
	then use ResolveAsMethodRef to return a MethodRef for it.
	(TypeDef.ResolveVarargMethod): Likewise.
	(TypeDef.ResolveField): Likewise.
	* MethodRef.cs (MethodRef.Resolve): Update use of TypeDef.Resolve*
	methods.
	* FieldRef.cs (FieldRef.Resolve): Update use of TypeDef.ResolveField.
	* PropertyDef.cs (PropertyDef.AsMethodDef): Throws an exception is the
	method is not a MethodDef.
	(PropertyDef.Define): Use AsMethodDef to ensure that get/set/other are
	MethodDefs.
	* EventDef.cs (EventDef.AsMethodDef): Same as PropertyDef.
	(EventDef.Define): Likewise.    

	* CodeGen.cs (CodeGen.ThisModule): New.
	(CodeGen.Write): Set module name if not set by '.module' directive.
	* Module.cs: Inherit from ExternRef. 

In class/PEAPI:

	* Metadata.cs (Module): Implment IExternRef to allow reference to types
	in 'this' module.


svn path=/branches/mono-1-1-13/mcs/; revision=57047
2006-02-19 14:52:30 +00:00
Zoltan Varga e5b91ab094 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57020
2006-02-17 22:29:58 +00:00
Ankit Jain a9728748e7 Backport r56674, r56698, r56746 and r56888.
In ilasm/codegen:
2006-02-10  Ankit Jain  <[email protected]>

	* CodeGen.cs (CodeGen.ResolveMethod): Throw exception if global method
	not found.
	(CodeGen.ResolveField): Likewise for global field.

2006-02-08  Ankit Jain  <[email protected]>

	* PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Simplify and fix
	behavior.

In ilasm/errors:
2006-02-10  Ankit Jain  <[email protected]>

	* err-global.il, err-global2.il: New. Tests for refs to non-existant
	global method/field.

2006-02-02  Ankit Jain  <[email protected]>

	* err-invalid-array-bounds.il: New. Test for 'lower bound <= upper bound'

In ilasm/parser:
2006-02-09  Ankit Jain  <[email protected]>

	* ILParser.jay (bound | int32): Handle invalid -ve size.

2006-02-02  Ankit Jain  <[email protected]>

	* ILParser.jay (bound | int32 ELLIPSIS int32): Throw exception if
	lower_bound > upper_bound.     

In class/PEAPI:
2006-02-15  Raja R Harinath  <[email protected]>

	* Metadata.cs (BoundArray.CompressSignedNum): Document the
	transformation.  Avoid a few casts.

2006-02-15  Ankit Jain  <[email protected]>

	* Metadata.cs (BoundArray.CompressSignedNum): New. Encode signed values,
	used only for encoding lower bounds of arrays.
	(BoundArray.TypeSig): Use new CompressSignedNum to encode lower bounds.

2006-02-08  Ankit Jain  <[email protected]>

	* Metadata.cs (BoundArray.ctor): Change param 'upBounds' to sizes.
	(MetaData.CompressNum): Fix range check.


svn path=/branches/mono-1-1-13/mcs/; revision=57015
2006-02-17 19:43:15 +00:00
Ankit Jain f8834c4f48 Backport r56883, r56884 and r56889.
In mono/dis:
2006-02-15  Ankit Jain  <[email protected]>

	* get.c (get_array_shape): Use mono_metadata_decode_signed_value to get
	lower bounds.

In mono/metadata:
2006-02-15  Raja R Harinath  <[email protected]>

	* metadata.c (mono_metadata_decode_signed_value): Simplify.
	Delegate to mono_metadata_decode_value, and work on the returned value.

	* icall.c (ves_icall_MonoType_GetGenericArguments):
	Add consistency check here too.
	
2006-02-15  Ankit Jain  <[email protected]>

	* metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
	char/short etc.

2006-02-15  Ankit Jain  <[email protected]>

	* metadata.c (mono_metadata_decode_signed_value): New function to decode
	signed values, used only for representing lower bounds of arrays.
	(mono_metadata_parse_array_full): Use new
	mono_metadata_decode_signed_value to decode lower bounds.


svn path=/branches/mono-1-1-13/mono/; revision=57014
2006-02-17 19:37:33 +00:00
Ankit Jain 34a82ac108 Backport r56522 and r56699.
2006-02-09  Ankit Jain  <[email protected]>

	* get.c (stringify_array): New. Returns the stringified representation
	of an array.
	(dis_stringify_array): Use stringify_array.
	(get_array_shape): Likewise. Also, allow lo_bounds to be signed.

2006-02-03  Sebastien Pouliot  <[email protected]>

	* get.c: Added #include <mono/utils/mono-compiler.h> so VS.NET
	can compile monodis.


svn path=/branches/mono-1-1-13/mono/; revision=57013
2006-02-17 19:12:37 +00:00
Zoltan Varga a5c28269b1 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=57003
2006-02-17 18:24:18 +00:00
Dick Porter 31df63b323 2006-02-17 Dick Porter <[email protected]>
* handles-private.h: 
        * handles.c: Check handle values passed to array lookups.  Fixes
        bug 77572.



svn path=/branches/mono-1-1-13/mono/; revision=56977
2006-02-17 15:51:34 +00:00
Dick Porter 6d59bc1f3f 2006-02-16 Dick Porter <[email protected]>
* IPEndPoint.cs: The SocketAddress AddressFamily takes up the
        first two bytes, not just one.  Check the size of the
        SocketAddress buffer for IPv6 as well.

        * Dns.cs: Cope when GetHostByName_internal or
        GetHostByAddr_internal returns fewer items in the array than it
        intended to (maybe due to conversion errors.)



svn path=/branches/mono-1-1-13/mcs/; revision=56955
2006-02-16 18:12:14 +00:00
Dick Porter 5fd7dc5ada 2006-02-16 Dick Porter <[email protected]>
* socket-io.c (create_object_from_sockaddr): Fix typo.
        (create_sockaddr_from_object): Check array lengths before
        potentially accessing items off the end.
        (ves_icall_System_Net_Sockets_Socket_Receive_internal)
        (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
        (ves_icall_System_Net_Sockets_Socket_Send_internal)
        (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
        length checks to avoid wraparound overflows.
        (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
        contents of the array of sockets
        (hostent_to_IPHostEntry2)
        (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
        Check return value of inet_ntop ().
        (addrinfo_to_IPHostEntry): Fix typo



svn path=/branches/mono-1-1-13/mono/; revision=56954
2006-02-16 18:11:49 +00:00
Martin Baulig f0b2efd583 Mono_GetGenericFieldDefinition() is gone.
svn path=/branches/mono-1-1-13/mcs/; revision=56914
2006-02-16 02:48:41 +00:00
Martin Baulig 818b91cb22 Put back r56664 which was accidentally reverted in r56695.
svn path=/branches/mono-1-1-13/mcs/; revision=56913
2006-02-16 01:57:04 +00:00
Martin Baulig 571d48dba8 **** Merged r56867, r56896 and r56906 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=56912
2006-02-16 01:12:35 +00:00
Martin Baulig 7788901473 **** Merged r56905-r54907 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56911
2006-02-16 01:07:31 +00:00
Martin Baulig 4ff6ffbe36 **** Merged r56897-r54900 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56910
2006-02-16 01:05:12 +00:00
Martin Baulig 28e122bcf5 **** Merged r56868-r54869 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56909
2006-02-16 01:02:04 +00:00
Martin Baulig e60232a944 **** Merged r56854-r54864 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56908
2006-02-16 00:59:57 +00:00
Wade Berrier 11df64e4b8 copy from trunk 2 of 2
svn path=/branches/mono-1-1-13/mcs/; revision=56880
2006-02-14 22:15:41 +00:00
Wade Berrier 30032bb8fb copy from trunk 1 of 2
svn path=/branches/mono-1-1-13/mcs/; revision=56879
2006-02-14 22:14:57 +00:00
Wade Berrier 075ea9ac0d bump version
svn path=/branches/mono-1-1-13/mono/; revision=56875
2006-02-14 21:47:23 +00:00
Gonzalo Paniagua Javier 00d366568e from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=56838
2006-02-13 19:46:13 +00:00
Senganal T 870e79a0fd 2006-02-13 Senganal T <[email protected]>
* Test/ProviderTests/System.Data.SqlClient/SqlAdapterTest.cs : Added testcases for #77480
	* System.Data.Common/DbDataAdapter.cs :
		- FillSchema  : 
			- Add table to schema only if MissingSchemaAction is not Ignore
			Add schema to table if MissingSchemaAction is set to either of
			Add or AddWithKey
		- BuildSchema :
			- Set the Schema values only if MissingSchemaAction is set to
			AddWithKey


svn path=/branches/mono-1-1-13/mcs/; revision=56832
2006-02-13 07:54:39 +00:00
Zoltan Varga cad7a4e698 Revert the nullable reftypes change.
svn path=/branches/mono-1-1-13/mono/; revision=56796
2006-02-11 12:50:06 +00:00
Senganal T 16a08b18be 2006-02-11 Senganal T <[email protected]>
* Test/System.Data/DataTableTest.cs : Check AllowDBNull is set to false for PrimaryKey cols.
	* Test/System.Data/DataTableTest2.cs : added testcases for bug #77404
	* System.Data/UniqueConstraint.cs :
		- PostAddRange : Check PrimaryKey is not already set for the table
	* System.Data/DataTable.cs :
		- PrimaryKey : follow ms.net behavior when BeginInit , EndInit is used.
			- Add new priamry key only when EndInit is called.
			- Incase of an error, retain old primarykey 
		- EndInit :
			- Add Constraints after columns are added.
			- If both PrimaryKey Property and PrimaryKey Constraint are set,
			then the Constraint takes precedence.
	fixes bug #77404

svn path=/branches/mono-1-1-13/mcs/; revision=56791
2006-02-11 11:11:48 +00:00
Senganal T b3c23ed215 Fixes for the failing testcases in System.Data .. Backporting r56531,r56336 ..
svn path=/branches/mono-1-1-13/mcs/; revision=56790
2006-02-11 11:08:14 +00:00
Senganal T 5f6b7974bf Fixes for SqlClient failing testcases.backporting r56167.
svn path=/branches/mono-1-1-13/mcs/; revision=56789
2006-02-11 10:52:01 +00:00
Senganal T f66d6296f4 2006-01-16 Boris Kirzner <[email protected]>
* Test/System.Data/DataColumnCollectionTest2.cs: added test case for index update on
	column removal

2006-01-18 Boris Kirzner <[email protected]>
	* Mono.Data.SqlExpressions/ColumnReference.cs: added column and relation lazy evaluation 
	and caching.

2006-01-11 Boris Kirzner <[email protected]>
	* System.Data.Common/Index.cs: removed redundant call to RebuildIndex() in constructor.

Backporting Boris Kirzner's fixes to 1_1_13 (r55374,55636,55710)

svn path=/branches/mono-1-1-13/mcs/; revision=56788
2006-02-11 10:03:26 +00:00
Zoltan Varga df4807294d Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56779
2006-02-10 21:35:23 +00:00
Joshua Tauberer 8f38791659 Made 64bit clean. Patch from Joe Shaw.
svn path=/branches/mono-1-1-13/mcs/; revision=56756
2006-02-10 13:41:27 +00:00
Zoltan Varga d0ab558222 2006-02-10 Zoltan Varga <[email protected]>
* mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
	using __builtin_frame_address (1) as it doesn't work in the presence
	of optimizations. Hopefully fixes #77273.

svn path=/branches/mono-1-1-13/mono/; revision=56754
2006-02-10 11:47:54 +00:00
Martin Baulig 3a319110cb **** Merged r56749-r56750 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56751
2006-02-10 10:24:41 +00:00
Miguel de Icaza 89263dce56 Backport to 1.1.13
svn path=/branches/mono-1-1-13/mcs/; revision=56743
2006-02-10 01:20:48 +00:00
Dick Porter 1470ae3076 2006-02-09 Dick Porter <[email protected]>
* threads.c (mono_thread_detach): Drop a reference to the thread
        we're detaching.

2006-02-09  Dick Porter  <[email protected]>

        * threads.c: Cope with the problems caused by attaching already
        existing threads - they don't get the infrastructure to clean up
        after themselves, especially the ID to handle hash.  This fixes
        bug 77468.



svn path=/branches/mono-1-1-13/mono/; revision=56726
2006-02-09 21:25:32 +00:00
Zoltan Varga 5366c31ac9 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=56705
2006-02-09 14:42:47 +00:00
Miguel de Icaza 32df99bd6f Backport compiler fixes
svn path=/branches/mono-1-1-13/mcs/; revision=56695
2006-02-09 06:36:40 +00:00
Martin Baulig 661565dba9 **** Merged r56670 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56671
2006-02-08 03:46:04 +00:00
Martin Baulig 212281f2d3 **** Merged r56668 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56669
2006-02-08 02:56:50 +00:00
Martin Baulig 8cb3df657a **** Merged r56648 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=56667
2006-02-08 02:21:03 +00:00
Martin Baulig da6dc4eed5 **** Merged r56663 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56666
2006-02-08 02:20:12 +00:00
Martin Baulig afb6910759 **** Merged r56652 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56665
2006-02-08 02:19:39 +00:00
Martin Baulig 0d2f3751f1 **** Merged r56645, r56647 and r56648 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56664
2006-02-08 02:17:56 +00:00
Gonzalo Paniagua Javier 57bf6ae887 2006-02-07 Gonzalo Paniagua Javier <[email protected]>
* ChunkedInputStream.cs:
	* ChunkStream.cs: handle partial trailers and zero reads. Patch by Pawel
	Sakowski.


svn path=/branches/mono-1-1-13/mcs/; revision=56662
2006-02-08 01:38:22 +00:00
Gonzalo Paniagua Javier d709670672 2006-02-07 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't send the expect-100 if if there's no content.

	* HttpListenerRequest.cs:
	* HttpConnection.cs:
	* RequestStream.cs: use the content length header to avoid reading past
	the end of the stream.

	Patch by Horst Reiterer.


svn path=/branches/mono-1-1-13/mcs/; revision=56659
2006-02-08 01:34:24 +00:00
Gonzalo Paniagua Javier e9e448624a 2006-02-06 Gonzalo Paniagua Javier <[email protected]>
* shared.c: use MONO_SHARED_HOSTNAME as a substitute for gethostname()
	when creating the shared files in the .wapi directory.
	Fixes bug #77371.


svn path=/branches/mono-1-1-13/mono/; revision=56629
2006-02-07 17:54:44 +00:00
Ankit Jain dc919ec1d7 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
* socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
(ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
(ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
(ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
(ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.

svn path=/branches/mono-1-1-13/mono/; revision=56614
2006-02-07 12:56:34 +00:00
Ankit Jain 67722d400a * debug-debugger.h: Add missing file, copied verbatim from
trunk (r56444).

svn path=/branches/mono-1-1-13/mono/; revision=56613
2006-02-07 12:50:44 +00:00
Martin Baulig 1e5da6f858 **** Merged r56588 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=56589
2006-02-06 17:04:08 +00:00
Paolo Molaro c6f81f5b9a Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <[email protected]>
* mini-ppc.c: fix handling of exceptions in large methods (bug #74932).


svn path=/branches/mono-1-1-13/mono/; revision=56585
2006-02-06 14:15:01 +00:00
Senganal T 9fe6fe10ae 2006-02-05 Senganal T <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs: Test for DbNull when updating the scale 
	of decimal or numeric value. Fixes #77410
	Patch from Sebastien Robitaille <[email protected]>
	* System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterTest.cs : New : Testcase for bug #77410


svn path=/branches/mono-1-1-13/mcs/; revision=56571
2006-02-05 12:39:48 +00:00
Gonzalo Paniagua Javier d5fd43350d 2006-02-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added a missing overload for SetSocketOption.


svn path=/branches/mono-1-1-13/mcs/; revision=56555
2006-02-04 00:21:46 +00:00
Zoltan Varga 4e12849547 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56549
2006-02-03 22:31:56 +00:00
Martin Baulig a52936ffde **** Merged r56536 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=56537
2006-02-03 17:28:36 +00:00
Miguel de Icaza d644872f3b Backport of Neale's change
svn path=/branches/mono-1-1-13/mono/; revision=56534
2006-02-03 16:58:50 +00:00
Zoltan Varga 51ccea026b Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56526
2006-02-03 14:16:38 +00:00
Zoltan Varga cdcff1c71f 2006-02-03 Zoltan Varga <[email protected]>
* generics.2.cs: New test for #77442.

	* jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
	#77442.

svn path=/branches/mono-1-1-13/mono/; revision=56521
2006-02-03 13:31:29 +00:00
Gonzalo Paniagua Javier d02ae5061f 2006-01-26 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: (2.0) UploadString() returns string, not void.


svn path=/branches/mono-1-1-13/mcs/; revision=56501
2006-02-02 23:25:26 +00:00
Zoltan Varga 0d8b04be59 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=56494
2006-02-02 20:55:17 +00:00
Gonzalo Paniagua Javier f96ef184e3 svn path=/branches/mono-1-1-13/mcs/; revision=56491 2006-02-02 20:25:44 +00:00
Gonzalo Paniagua Javier 0724f383bd 2006-01-31 Gonzalo Paniagua Javier <[email protected]>
* ContainerTest.cs: new test.


svn path=/branches/mono-1-1-13/mcs/; revision=56490
2006-02-02 20:25:11 +00:00
Gonzalo Paniagua Javier c618aa1f93 2006-01-31 Gonzalo Paniagua Javier <[email protected]>
* Container.cs: patch by Brian Crowell that fixes GetService().


svn path=/branches/mono-1-1-13/mcs/; revision=56489
2006-02-02 20:24:43 +00:00
Zoltan Varga a7d1363cc6 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56487
2006-02-02 20:19:46 +00:00
Zoltan Varga 46a7ba89c5 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=56486
2006-02-02 20:09:00 +00:00
Martin Baulig 176dc4d4ac **** Merged r56464-r56465 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=56466
2006-02-02 11:59:03 +00:00
Martin Baulig e647c71760 **** Merged from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=56450
2006-02-02 11:20:28 +00:00
Martin Baulig 77eaced11d **** Merged r56441-56445 (debugging API changes) from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=56446
2006-02-02 10:38:34 +00:00
Paolo Molaro 1d2e52d593 Thu Feb 2 10:38:53 CET 2006 Paolo Molaro <[email protected]>
* pthread_support.c: make sure the proper cleanup also happens
	when using __thread vars.


svn path=/branches/mono-1-1-13/mono/; revision=56438
2006-02-02 09:39:47 +00:00
Zoltan Varga 639d7c0b7f Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=56386
2006-02-01 13:28:27 +00:00
Zoltan Varga f48b807c5b Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56362
2006-01-31 20:36:44 +00:00
Zoltan Varga 38f9f0879d Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=56359
2006-01-31 20:23:01 +00:00
Zoltan Varga 00fb6eea39 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=56351
2006-01-31 18:39:56 +00:00
Ankit Jain 2c02393df8 Backport r56324, r56329, r56331 and r56337.
In ilasm/tests:
2006-01-31  Ankit Jain  <[email protected]>

	* test-assembly2.il: New. Test for referencing undeclared external assembly.

In ilasm/codegen:
2006-01-31  Ankit Jain  <[email protected]>

	* TypeDef.cs (TypeDef.AddMethodDef): Throw exception with proper message
	if adding a duplicate method.

2006-01-31  Ankit Jain  <[email protected]>

	* InstrTable.cs (inst_table): Add 'readonly.' .

2006-01-31  Ankit Jain  <[email protected]>

	* ExternTable.cs (ExternTable.GetTypeRef): If type is from an 
	undeclared assembly, then add reference to the assembly.

In ilasm/scanner:
2006-01-31  Ankit Jain  <[email protected]>

	* ILTables.cs (keywords): Enable keyword 'type' only for NET_2_0 profile.

In class/PEAPI:
2006-01-31  Ankit Jain  <[email protected]>

	* Metadata.cs (Op.readonly_): New.


svn path=/branches/mono-1-1-13/mcs/; revision=56341
2006-01-31 16:28:02 +00:00
Senganal T 542db3c933 2006-01-31 Senganal <[email protected]>
* Test/DataSetTest.cs : Added testcase for #77411.
	* System.Data/DataSet.cs : Modified CopyRelations ()
		- Added code to copy ForeignKeyConstraints. Fixes #77411.


svn path=/branches/mono-1-1-13/mcs/; revision=56340
2006-01-31 16:24:59 +00:00
Atsushi Eno 28c09a3cc2 merged r56309 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=56320
2006-01-31 07:54:40 +00:00
Atsushi Eno 5ad3531cd8 merged r56250 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=56319
2006-01-31 07:52:03 +00:00
Atsushi Eno 32e28e47e6 merged r56026 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=56318
2006-01-31 07:44:13 +00:00
Atsushi Eno fff12b1908 merged r56032 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=56317
2006-01-31 07:39:26 +00:00
Atsushi Eno 9369390676 merged r55978 from trunk.
svn path=/branches/mono-1-1-13/mono/; revision=56316
2006-01-31 07:38:29 +00:00
Atsushi Eno 1f613a1653 merged 55971 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=56315
2006-01-31 07:27:08 +00:00
Joshua Tauberer 810dc5158d Merge from trunk 55161:HEAD to Mono.Data.SqliteClient.
svn path=/branches/mono-1-1-13/mcs/; revision=56294
2006-01-30 22:16:17 +00:00
Gonzalo Paniagua Javier ec4600822d from HEAD. .dll and .Config are 403 now.
svn path=/branches/mono-1-1-13/mono/; revision=56266
2006-01-30 18:08:21 +00:00
Raja R Harinath 9e0243cbbf update
svn path=/branches/mono-1-1-13/mcs/; revision=56252
2006-01-30 14:32:40 +00:00
Raja R Harinath edd26bd0f7 ** backport r56248 from HEAD
svn path=/branches/mono-1-1-13/mcs/; revision=56249
2006-01-30 14:22:49 +00:00
Miguel de Icaza 827aaeae7f backport test too
svn path=/branches/mono-1-1-13/mcs/; revision=56233
2006-01-29 23:58:00 +00:00
Miguel de Icaza ae8301741f Backport last 3 fixes to branch
svn path=/branches/mono-1-1-13/mcs/; revision=56232
2006-01-29 23:55:41 +00:00
Miguel de Icaza 199c2205b4 Backport fix to branch
svn path=/branches/mono-1-1-13/mono/; revision=56231
2006-01-29 23:55:21 +00:00
Miguel de Icaza 417697e53a Backport fix to branch
svn path=/branches/mono-1-1-13/mono/; revision=56230
2006-01-29 23:55:12 +00:00
Ankit Jain e41a822945 Backport r56088, r56166 and r56189.
2006-01-28  Ankit Jain  <[email protected]>

	* get.c (get_method_core): Emit generic arity for a MemberRef.
	(get_method_override): Emit full sig only if its a generic type.

2006-01-27  Ankit Jain  <[email protected]>

	* get.c (get_methodref_signature): Remove 'context' parameter.
	Update call sites.
	* get.h (get_methodref_signature): Update.
	* dump.c (dump_table_memberref): Update.

2006-01-26  Raja R Harinath  <[email protected]>

	* get.c (stringify_double): Simplify, and avoid 'E' too.


svn path=/branches/mono-1-1-13/mono/; revision=56203
2006-01-28 08:16:34 +00:00
Ankit Jain 24e89c4d94 Backport r56159, r56179, r56190-192.
In ilasm/codegen:
2006-01-28  Ankit Jain  <[email protected]>

	* MethodDef.cs:
	* TypeManager.cs:
	* MethodPointerTypeRef.cs:
	* ExternMethodRef.cs: Remove unused variables to fix warnings.

2006-01-28  Ankit Jain  <[email protected]>

	* TypeDef.cs (GenericInfo):
	* MethodDef.cs (GenericInfo): Remove (unused).

In ilasm/scanner:
2006-01-28  Ankit Jain  <[email protected]>

	* ILTables.cs (keywords): Fix typos in entry for 'charmaperror'.

In ilasm/parser:
2006-01-28  Ankit Jain  <[email protected]>

	* ILParser.jay (pinv_attr | ..): Fix typo.

2006-01-28  Ankit Jain  <[email protected]>

	* ILParser.jay (method_ref): Remove 2 redundant productions.
	(method_decl | D_OVERRIDE K_METHOD ..): New production for overriding
	generic methods.

2006-01-27  Ankit Jain  <[email protected]>

	* ILParser.jay (formal_typars_clause): Allow generics only for NET_2_0 profile.
	(typars_clause): Likewise.


svn path=/branches/mono-1-1-13/mcs/; revision=56202
2006-01-28 08:13:09 +00:00
Zoltan Varga 8ed815e9a4 Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56184
2006-01-27 19:30:33 +00:00
Gonzalo Paniagua Javier 849cb942a3 2006-01-27 Gonzalo Paniagua Javier <[email protected]>
* TextWriter.cs: Dispose () is public in 2.0.


svn path=/branches/mono-1-1-13/mcs/; revision=56177
2006-01-27 18:44:11 +00:00
Gonzalo Paniagua Javier 1bb398b766 2006-01-26 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: (2.0) UploadString() returns string, not void.


svn path=/branches/mono-1-1-13/mcs/; revision=56130
2006-01-27 00:19:30 +00:00
Gonzalo Paniagua Javier ddcba9afcf 2006-01-26 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: use UInt64.Parse for content length. In AppendHeader,
	set cache_control through the property to update the cachebility
	accordingly. When using the cached headers, don't add again all the
	headers to that collection.
	* HttpCacheVaryByParams.cs: if there are no params, return null.
	Otherwise we get an empty 'Vary' header.


svn path=/branches/mono-1-1-13/mcs/; revision=56126
2006-01-26 23:11:56 +00:00
Zoltan Varga f757a0160c Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56113
2006-01-26 17:31:54 +00:00
Zoltan Varga caa3147dcf Merge from HEAD.
svn path=/branches/mono-1-1-13/mcs/; revision=56112
2006-01-26 17:31:27 +00:00
Chris Toshok 4fbed4ee86 2006-01-25 Chris Toshok <[email protected]>
* ClientScriptManager.cs (RegisterClientScriptResource): last
	patch, I swear.  How can 1 line of code have 3 bugs?


svn path=/branches/mono-1-1-13/mcs/; revision=56081
2006-01-25 22:52:42 +00:00
Ankit Jain 1e400ba4d5 Backporting r55068
In mono/dis:
2006-01-26  Ankit Jain  <[email protected]>

	* get.c (stringify_double): Remove trailing '.' if it has 'e'.

2006-01-25  Ankit Jain  <[email protected]>

	* get.c (stringify_double): New. Fix printing of float/doubles to enable
	roundtripping.
	* get.h (stringify_double): Add new function.
	(get_constant): Use stringify_double.
	* dis-cil.c (disassemble_cil): Likewise.
	
2006-01-25  Ankit Jain  <[email protected]>
	    Raja R Harinath  <[email protected]>

	* get.c (dis_stringify_type): For MVAR/VAR, print number if the generic param
	is in the mono_generic_params_with_ambiguous_names table.

2006-01-20  Raja R Harinath  <[email protected]>

	* main.c (monodis_assembly_load_hook): New.
	(monodis_assembly_search_hook): New.
	(main): Install them as hooks into the assembly loading core.

Backporting r56036.
In mono/metadata:
2006-01-25  Ankit Jain  <[email protected]>

	* metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
	move definition to ..
	* metadata.c (mono_generic_params_with_ambiguous_names): .. here.
	
2006-01-25  Ankit Jain  <[email protected]>
	    Raja R Harinath  <[email protected]>

	* metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
	* metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
	as necessary.


svn path=/branches/mono-1-1-13/mono/; revision=56072
2006-01-25 21:31:21 +00:00
Chris Toshok 340d67b758 2006-01-25 Chris Toshok <[email protected]>
* ClientScriptManager.cs (RegisterClientScriptResource): gah, fix
	problem with last commit - unquote "resourceName" so it uses the
	parameter instead of the string constant.


svn path=/branches/mono-1-1-13/mcs/; revision=56064
2006-01-25 21:15:50 +00:00
Chris Toshok 52406c8ccb 2006-01-25 Chris Toshok <[email protected]>
* ClientScriptManager.cs (RegisterClientScriptResource):
        implement.  backported fix from HEAD.


svn path=/branches/mono-1-1-13/mcs/; revision=56058
2006-01-25 18:51:18 +00:00
Raja R Harinath f2e9427a5c * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
svn path=/branches/mono-1-1-13/mono/; revision=56042
2006-01-25 14:31:51 +00:00
Miguel de Icaza 18c740db38 Backport mcs and gmcs fixes
svn path=/branches/mono-1-1-13/mcs/; revision=56011
2006-01-24 22:08:36 +00:00
Gonzalo Paniagua Javier 8e1e5b4097 2006-01-24 Gonzalo Paniagua Javier <[email protected]>
* ListControl.cs: bound checking for Items when loading the control
	state, as the number might have been changed on the fly. Patch by
	Elliott Draper.


svn path=/branches/mono-1-1-13/mcs/; revision=56008
2006-01-24 21:55:07 +00:00
Gonzalo Paniagua Javier 9b4068798a 2006-01-24 Gonzalo Paniagua Javier <[email protected]>
* HttpRequest.cs: fixed the file path when RewritePath is used. Also
	add the PathInfo to the Url. Fixes bug #77291.


svn path=/branches/mono-1-1-13/mcs/; revision=56006
2006-01-24 21:27:04 +00:00
Paolo Molaro 422cb6cc96 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <[email protected]>
* profiler.c: fix printing of data.


svn path=/branches/mono-1-1-13/mono/; revision=55997
2006-01-24 17:55:46 +00:00
Paolo Molaro d2c18ab72f Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <[email protected]>
* object.c: fix deadlock related to string interning.


svn path=/branches/mono-1-1-13/mono/; revision=55974
2006-01-24 08:59:17 +00:00
Gonzalo Paniagua Javier a48d54b56c 2006-01-23 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: ignore 'thead'. Fixes bug #77326.


svn path=/branches/mono-1-1-13/mcs/; revision=55959
2006-01-23 20:27:56 +00:00
Martin Baulig bec0751d5b **** Merged r55947 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55948
2006-01-23 16:00:55 +00:00
Martin Baulig 50b08c4665 **** Merged r55944 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55945
2006-01-23 15:10:13 +00:00
Ankit Jain f7f9eda2db Backporting r55941.
In tests:
	* err-*.il, test-perm_fail*.il: Move negative tests from here to errors/ .

In errors:
	* err-*.il, test-perm_fail*.il: Move negative tests from tests/ to here.

svn path=/branches/mono-1-1-13/mcs/; revision=55943
2006-01-23 15:08:07 +00:00
Ankit Jain 435cb2dd46 Backporting r55938.
* TypeDef.cs (TypeDef.AddFieldDef): Throw exception if duplicate field being
added.

svn path=/branches/mono-1-1-13/mcs/; revision=55942
2006-01-23 15:00:02 +00:00
Martin Baulig 5d246500ef **** Merged r55939 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55940
2006-01-23 14:33:31 +00:00
Atsushi Eno 14837aa6c1 merged r55926 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=55927
2006-01-23 06:07:27 +00:00
Martin Baulig 51d9b8154e Completely removed appdomain-unload.cs to make the build work again; you can't just disable it like this.
svn path=/branches/mono-1-1-13/mono/; revision=55890
2006-01-21 19:50:54 +00:00
Martin Baulig fa5c7724ea **** Merged r55888 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55889
2006-01-21 19:44:13 +00:00
Martin Baulig 643e1a7a03 **** Merged r55883 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55884
2006-01-21 15:46:46 +00:00
Martin Baulig 6e2a247bf7 **** Merged 55879 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55881
2006-01-21 14:44:07 +00:00
Martin Baulig de22929eb0 **** Merged 55876 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55878
2006-01-21 14:37:03 +00:00
Gonzalo Paniagua Javier 1171cba17b from head
svn path=/branches/mono-1-1-13/mcs/; revision=55857
2006-01-20 20:11:08 +00:00
Atsushi Eno 6a7fb1c73d merged r55707 and 55712 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=55851
2006-01-20 17:26:54 +00:00
Atsushi Eno 8522885699 merged r55706 and r55724 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=55846
2006-01-20 17:16:19 +00:00
Atsushi Eno 806646dcc8 merged r55619 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=55845
2006-01-20 17:12:45 +00:00
Gonzalo Paniagua Javier ae46d2413b 2006-01-20 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: (ReadToEnd) if Read returns -1 or 0, we're done.


svn path=/branches/mono-1-1-13/mcs/; revision=55844
2006-01-20 16:58:34 +00:00
Atsushi Eno ff409be5fe merged r55626, r55627, r55674, r55677, r55824-55828, r55831 and r55838
from trunk.


svn path=/branches/mono-1-1-13/mcs/; revision=55843
2006-01-20 16:57:29 +00:00
Atsushi Eno 9585905fc7 merged r55794, r55795, r55823, r55830, r55832 and r55833 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=55841
2006-01-20 16:56:36 +00:00
Atsushi Eno 68da0245b6 merged r55620.
svn path=/branches/mono-1-1-13/mcs/; revision=55840
2006-01-20 16:38:49 +00:00
Wade Berrier 7bf6b8a543 Disable unload test:
(23:13:26) miguel: Wade, can you remove the appdomain-unloaad.exe from the tests being ran?
(23:13:31) miguel: That always randomly fails


svn path=/branches/mono-1-1-13/mono/; revision=55822
2006-01-20 06:36:49 +00:00
Wade Berrier 24906dde22 oops, recopy from trunk
svn path=/branches/mono-1-1-13/mcs/; revision=55819
2006-01-20 03:01:55 +00:00
Wade Berrier bf9916e270 oops
svn path=/branches/mono-1-1-13/mcs/; revision=55818
2006-01-20 03:00:47 +00:00
Wade Berrier c6747a0d3f copy from trunk for 1.1.13.2
svn path=/branches/mono-1-1-13/mcs/; revision=55816
2006-01-20 02:39:44 +00:00
Wade Berrier 17a0cd07df delete in order to copy from trunk
svn path=/branches/mono-1-1-13/mcs/; revision=55815
2006-01-20 02:36:41 +00:00
Wade Berrier d23c285914 bump version
svn path=/branches/mono-1-1-13/mono/; revision=55813
2006-01-20 02:00:02 +00:00
Gonzalo Paniagua Javier c94c32d25f Fix the name of the class that handles system.net/settings
svn path=/branches/mono-1-1-13/mono/; revision=55809
2006-01-20 01:20:33 +00:00
Gonzalo Paniagua Javier d14f7229de 2006-01-19 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: use the 2.0 configuration classes when checking for IPv6
	support.


svn path=/branches/mono-1-1-13/mcs/; revision=55807
2006-01-20 01:19:10 +00:00
Gonzalo Paniagua Javier 358364e296 2006-01-19 Gonzalo Paniagua Javier <[email protected]>
* Console.cs: if InternalCodePage returns -1, use the default encoding.
	Also match the UTF8 one properly. Patch by [email protected].


svn path=/branches/mono-1-1-13/mcs/; revision=55805
2006-01-20 00:47:59 +00:00
Ankit Jain 3c3298c935 Backport r55786
In ilasm/tests:
	* test-module-cattr.il: New. Test for custom attributes on .module
	* test-array-2.i: Add the missing closing brace.

In ilasm/codegen:
	* Module.cs (Module): New. Class for representing this module.
	* CodeGen.cs (CodeGen): Update to use the new Module class.
	(CodeGen.Write): Resolve this_module.

In ilasm:
	* ilasm.exe.sources: Add Module.cs to the build.

In ilasm/parser:
	* ILParser.jay (decl | customattr_decl): Add custom attributes.
	(assembly_all | ..): Set CurrentCustomAttrTarget to null.

svn path=/branches/mono-1-1-13/mcs/; revision=55787
2006-01-19 15:26:09 +00:00
Ankit Jain a8169657e5 Backport r55715, r55772
2006-01-19  Ankit Jain  <[email protected]>

	* main.c (dis_type): Dump custom attributes for a type before doing the same
	for its type parameters.

2006-01-18  Ankit Jain  <[email protected]>

	* main.c (typedef_flags): Change 'special-name' to 'specialname'.


svn path=/branches/mono-1-1-13/mono/; revision=55780
2006-01-19 13:21:49 +00:00
Ankit Jain 2abcd8c550 Backport r55773, r55778
In ilasm/tests:
2006-01-19  Ankit Jain  <[email protected]>

	* err-gen-cattr-1.il: New.
	* err-gen-cattr-2.il: New.
	* err-gen-cattr-3.il: New.
	* err-gen-cattr-4.il: New.

In ilasm/codegen:
2006-01-19  Ankit Jain  <[email protected]>

	* GenericParameters.cs (GenericParameter): Implement ICustomAttrTarget.
	(GenericParameter.Resolve): New overload, reduce code duplication.
	(GenericParameters.GetGenericParam): New. Returns a GenericParameter.
	(GenericParameters.GetGenericParamNum): Update to use new GetGenericParam.

	* TypeDef.cs (TypeDef.GetGenericParam): New. Two overloads for id and index.
	* MethodDef.cs (MethodDef.GetGenericParam): Likewise.

2006-01-19  Ankit Jain  <[email protected]>

	* MethodRef.cs (MethodRef.Resolve): Resolve owner.

In ilasm/scanner:
2006-01-19  Ankit Jain  <[email protected]>

	* ILTables.cs (keywords): Add 'type' keyword.

In ilasm/parser:
2006-01-19  Ankit Jain  <[email protected]>

	* ILParser.jay (K_TYPE): New.
	(param_type_decl): New. Rule for '.param type ..', for specifying custom attibutes
	for type parameters.
	(class_decl | param_type_decl):
	(method_decl | param_type_decl): New.

In class/PEAPI:
2006-01-19  Ankit Jain  <[email protected]>

	* Metadata.cs (GenericParameter.GetCodedIx): Override. Return coded index
	for HasCustomAttr.
	(MetaData.BuildMetaData): Sort CustomAttribute table at the end.


svn path=/branches/mono-1-1-13/mcs/; revision=55779
2006-01-19 13:20:16 +00:00
Zoltan Varga 0d8ab85503 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=55777
2006-01-19 12:11:23 +00:00
Martin Baulig cab3731f55 Add dependency.
svn path=/branches/mono-1-1-13/mcs/; revision=55748
2006-01-18 18:34:15 +00:00
Martin Baulig 8ec3155df9 **** Merged r55737 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55742
2006-01-18 17:43:38 +00:00
Martin Baulig cbf8c48dd3 **** Merged r55728 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55741
2006-01-18 17:38:12 +00:00
Martin Baulig b1ecc84c40 **** Merged r55727 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55740
2006-01-18 17:34:09 +00:00
Martin Baulig 397b7ac493 **** Merged r55726 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55739
2006-01-18 17:31:33 +00:00
Robert Jordan 050260877b Merged from HEAD r55720:55721
svn path=/branches/mono-1-1-13/mcs/; revision=55723
2006-01-18 14:15:33 +00:00
Robert Jordan 671301931a Merged from HEAD r55719:55720
svn path=/branches/mono-1-1-13/mcs/; revision=55722
2006-01-18 14:11:54 +00:00
Zoltan Varga ee40dbd92b Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=55719
2006-01-18 13:50:52 +00:00
Zoltan Varga 91edcf60a5 Merge r55693 from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=55694
2006-01-17 20:55:13 +00:00
Senganal T 7202caa9d9 2006-01-17 Senganal T <[email protected]>
* Test/System.Data/DataRowTest2.cs : added testcase for bug #77267
	* System.Data/DataRow.cs:
		ItemArray : Modified to raise RowNotInTableException only if
		the concerned row has been removed from the table.Fixes
		bug #77267


svn path=/branches/mono-1-1-13/mcs/; revision=55679
2006-01-17 12:46:05 +00:00
Ankit Jain e5c93bb691 Backporting r55672.
* get.c (get_method_override): Use '.override method' syntax if the class or
or the method itself is generic.
* main.c (dis_code): Emit '.override' only, 'method' gets handled by get_method_override.

svn path=/branches/mono-1-1-13/mono/; revision=55673
2006-01-17 11:08:05 +00:00
Senganal T 57accaa58c 2006-01-17 Senganal T <[email protected]>
* Test/ProviderTests/sqlserver.config : Modified the default login and password to 'monotester'
	* Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs : Added testcase for bug #77225
	* System.Data.SqlClient/SqlCommandBuilder.cs
		- Modified CreateNewCommand () : Clean up any existing parameter list
		before reusing the command.Fixes #77225


svn path=/branches/mono-1-1-13/mcs/; revision=55671
2006-01-17 09:40:55 +00:00
Ankit Jain 5ca532241d Backporting fixes for mono/dis (r55667)
2006-01-17  Ankit Jain  <[email protected]>

	* get.c (init_key_table): Add keywords 'bestfit', 'charmaperror', 'off' & 'on'.

2006-01-16  Ankit Jain  <[email protected]>

	* get.c (get_method_core): Handle a MemberRef with a TypeSpec parent.
	Inflate MonoMethod after getting it from mono_get_method_full.

2006-01-15  Ankit Jain  <[email protected]>

	* get.c (get_method_override): Get full signature of the method.
	* main.c (dis_code): Emit ".override method" for full signature
	of the method.


svn path=/branches/mono-1-1-13/mono/; revision=55670
2006-01-17 09:21:16 +00:00
Ankit Jain 5295717ed2 Backporting fixes for ilasm & class/PEAPI (r55663).
In class/PEAPI:
2006-01-16  Ankit Jain  <[email protected]>

	* Metadata.cs (PInvokeAttr): Add 'bestfit_on', 'bestfit_off', 'bestfit_mask',
	'charmaperror_on' & 'charmaperror_off'.

2006-01-13  Ankit Jain  <[email protected]>

	* Metadata.cs (GenericMethodSig): Ensure sig is added to the blob only once.

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

	* Metadata.cs (GenParam): Don't use GetTypeSpec to create typespec for GenParam. 
	Adding required methods directly to GenParam.
	* PEAPI.cs (PEFile.AddGenericParam): Add it to the TypeSpec table directly.

2006-01-09  Ankit Jain  <[email protected]>

	* PEAPI.cs (PEFile.AddGenricParam): New. Adds a GenParam to the TypeSpec
	table.
	* Metadata.cs (GenParam): Inherit from 'Class' instead of 'Type'.
	(GenParam.name): Rename to param_name as it hides Class.name .
	(GenParam.GetTypeSpec): Override to create TypeSpec for genparam.

2006-01-08  Ankit Jain  <[email protected]>

	* Metadata.cs (TypeOp): Add 'constrained' op.

2006-01-07  Ankit Jain  <[email protected]>

	* Metadata.cs (GenericParamAttributes): New.
	(MetaDataElement.Row): Always set value.
	(GenericParameter): Update to use GenericParameterAttributes.
	(GenericParameterConstraint.SortKey): New. override to support sorting.
	(ClassDef.AddGenericParameter):
	(MethodDef.AddGenericParameter): New overloads for accepting attributes also.

In ilasm/tests:
2006-01-16  Ankit Jain  <[email protected]>

	* test-int64.il: New. Test for large numeric values.

2006-01-16  Ankit Jain  <[email protected]>

	* test-array-2.il: New. Test for methodref to Array's methods.
	eg. class test [,]::.ctor (int32, int32)

2006-01-15  Ankit Jain  <[email protected]>

	* test-override-1.il:
	* test-override-2.il: New. Test for 'full' syntax of specifying
	overrides. (.override method ..full sig.. )

2006-01-14  Ankit Jain  <[email protected]>

	* gen-instr1.il: New. Test for using GenericParams as operands to
	type instructions.

2006-01-11  Ankit Jain  <[email protected]>

	* gen-nested2.il: New.
	* gen-nested3.il: New. Test for new syntax for specifying namespace ie.,
	as part of the type name instead of using '.namespace' directive.

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

	* gen-nested.il: New. Test for a generic type nested in a non-generic
	one.

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

	* gen-meth3.il: New. Test for abstract generic method.

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

	* gen-meth1.il: New. Test for use of VAR/MVAR by name (!!A)
	* gen-meth2.il: New. Test for using VAR/MVAR as class ref.

2006-01-09  Ankit Jain  <[email protected]>

	* gen-recur.il: New. Test for a class implementing a generic interface
	with the class itself as the argument.

2006-01-07  Ankit Jain  <[email protected]>

	* gen-constraints1.il: New. Test for constraints on generic parameters.

In ilasm/codegen:
2006-01-16  Ankit Jain  <[email protected]>

	* TypeDef.cs (TypeDef.IComparable): Implement IComparable interface.
	* TypeManager.cs (TypeManager.DefineAll): Sort type_table before Define()'ing.

2006-01-16  Ankit Jain  <[email protected]>

	* TypeRef.cs (TypeRef.CreateMethodRef): Return a TypeSpecMethodRef if
	this is a modified (eg. []) type.	

2006-01-16  Ankit Jain  <[email protected]>

	* BaseTypeRef.cs (BaseTypeRef.Resolve): Make this abstract.
	(BaseTypeRef.CreateMethodRef):
	(BaseTypeRef.CreateFieldRef): Make protected and abstract.
	* BaseClassRef.cs (BaseClassRef.Clone): Make this abstract.
	Update all derived classes.
	* PrimitiveTypeRef.cs (PrimitiveTypeRef.CreateMethodRef):
	* GenericTypeInst.cs (GenericTypeInst.CreateMethodRef): Implement, but throw
	exception as this method is not used.

2006-01-14  Ankit Jain  <[email protected]>

	* GenericParamRef.cs (GenericParamRef.Resolve): Apply modifications to the
	cached type.

2006-01-14  Ankit Jain  <[email protected]>

	* GenericParamRef.cs (GenericParamRef.Resolve): Set PeapiType of the instance
	to the cached one.

2006-01-13  Ankit Jain  <[email protected]>

	* GenericParamRef.cs (GenericParamRef.Resolve): Ensure no duplicate
	GenParams get added to the TypeSpec table.
	* GenericMethodSig.cs (GenericMethodSig.GetInstance): Cache sigs in a
	static hashtable.
	* BaseMethodRef.cs (BaseMethodRef.GetGenericMethodRef): Cache GenericMethodRefs.

2006-01-13  Ankit Jain  <[email protected]>

	Create BaseMethodRef from IMethodRef. Replace usage of IMethodRef
	with BaseMethodRef in *all* files. 
	Remove implementations of IMethodRef's methods from derived classes.
	* BaseMethodRef.cs: New.

2006-01-13  Ankit Jain  <[email protected]>

	Move caching of method-refs and field-refs to BaseTypeRef, and use
	CreateMethodRef & CreateFieldRef for creating the actual object.
	Override these in derived classes to return the right objects.

	* BaseTypeRef.cs (BaseTypeRef.CreateMethodRef): New.
	(BaseTypeRef.CreateFieldRef): New.
	(BaseTypeRef.GetMethodRef): Implement caching.
	(BaseTypeRef.GetFieldRef): Likewise.
	
	GenericTypeInst and PrimitiveTypeRef are not cached, so static hashtables
	are used here for caching their MethodRefs n FieldRefs.

	* GenericTypeInst.cs (GenericTypeInst.GetMethodRef): Override and use
	static hashtable to do caching.
	(GenericTypeInst.GetFieldRef): Likewise.
	* PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Likewise.
	(PrimitiveTypeRef.GetFieldRef): Likewise.

	* CodeGen.cs (CodeGen.GetGlobalMethodRef): New. Cache global method refs.
	(CodeGen.GetGlobalFieldRef): New. Cache global field refs.

2006-01-13  Ankit Jain  <[email protected]>

	Create BaseClassRef, BaseGenericTypeRef from IClassRef & IGenTypeRef.
	Replace usage of interfaces ITypeRef, IClassRef & IGenTypeRef with their
	corresponding Base* types.
	* BaseTypeRef.cs: New. Combine ITypeRef and ModifiableType into this.
	* BaseClassRef.cs: New.
	* BaseGenericTypeRef.cs: New.
	* TypeSpecMethodRef.cs (TypeSpecMethodRef.ctor): Slight change in order
	of params.

2006-01-12  Ankit Jain  <[email protected]>

	* MethodDef.cs (MethodDef.CreateSignature): Use "`n" only for generic
	methods.

2006-01-11  Ankit Jain  <[email protected]>

	* InstrTable.cs (inst_table): Uncomment stelem and ldelem .

2006-01-11  Ankit Jain  <[email protected]>

	Support new syntax of specifying namespace, ie., as
	part of the type name. (gen-nested2.il)
	* TypeDef.cs (TypeDef.ctor): Add outer as a param.
	Don't split name on '.' for inner classes.
	* CodeGen.cs (CodeGen.BeginTypeDef): Update to use only 'name'
	for inner classes and FullName for outermost class.

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

	* TypeDef.cs (TypeDef.GetGenericParamNum): Return -1 if type has no
	generic parameters.
	* MethodDef.cs (MethodDef.GetGenericParamNum): Likewise.

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

	* MethodDef.cs (MethodDef.WriteCode): Resolve generic params for abstract
	methods also.

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

	* TypeDef.cs (TypeDef.TypeParameters): New.
	(TypeDef.ResolveGenParams): New. Resolve any gen param refs in
	constraints, base class ref or implemented interfaces.
	* MethodDef.cs (MethodDef.ResolveGenParams): Update to use new Resolve
	overloads and ResolveConstraints for GenericParameters.

	* GenericTypeInst.cs (GenericTypeInst.Resolve): Resolve generic args.
	* GenericParamRef.cs (GenericParamRef.Resolve): Implement.
	* GenericParameters.cs (GenericParameter.ResolveConstraints): New.
	(GenericParameters.ResolveConstraints): New.
	* GenericArguments.cs (GenericArguments.Resolve): New.

	* TypeRef.cs (TypeRef.GetGenericTypeInst): Don't cache.
	* ExternTypeRef.cs (ExternTypeRef.GetGenericTypeInst): Likewise.

2006-01-09  Ankit Jain  <[email protected]>

	* GenericArguments.cs (GenericArguments.is_resolved): New.
	(GenericArguments.p_type_list): New. Resolve only once and return this.

2006-01-09  Ankit Jain  <[email protected]>

	* TypeDef.cs (TypeDef.Define): Set is_defined to true as soon as the
	Peapi type gets created.

2006-01-09  Ankit Jain  <[email protected]>

	* GenericTypeRef.cs: Rename to ..
	* GenericParamRef.cs: .. this.
	(IGenericTypeRef): New.
	(GenericParamRef): Implement IGenericTypeRef.
	* GenericTypeInst.cs (GenericTypeInst): Implement IGenericTypeRef instead
	of IClassRef.
	(GenericTypeInst.ResolveOnly): Rename to ResolveNoTypeSpec to implement
	IGenericTypeRef.ResolveNoTypeSpec .
	* MethodDef.cs (MethodDef.ResolveGenParams): Update to use GenericParamRef.
	* Local.cs (Local.GetPeapiLocal): Use IGenericTypeRef.

2006-01-08  Ankit Jain  <[email protected]>

	* InstrTable.cs (inst_table): Add stelem.any, ldelem.any and
	constrained. instructions.

2006-01-07  Ankit Jain  <[email protected]>

	* GenericParameters.cs (GenericParameter): New.
	(GenericParameters): Collection of Generic parameters.
	* TypeDef.cs:
	* CodeGen.cs:
	* MethodDef.cs: Update to use the new GenericParameters class.

In ilasm:
2006-01-13  Ankit Jain  <[email protected]>

	* ilasm.exe.sources: Replace IMethodRef.cs with BaseMethodRef.cs

2006-01-09  Ankit Jain  <[email protected]>

        * ilasm.exe.sources: Replace GenericTypeRef.cs with GenericParamRef.cs

2006-01-07  Ankit Jain  <[email protected]>

	* ilasm.exe.sources: Add GenericParameters.cs to the build.

In ilasm/scanner:
2006-01-16  Ankit Jain  <[email protected]>

	* NumberHelper.cs (NumberHelper.Build): Try parsing numeric value as UInt64 or 
	double if Int64.Parse fails.

2006-01-16  Ankit Jain  <[email protected]>

	* ILTables.cs (keywords): Add 'bestfit', 'charmaperror', 'on' & 'off'.

2006-01-16  Ankit Jain  <[email protected]>

	* ILTables.cs (keywords): Add 'uint', this is a native UIntPtr type.

In ilasm/parser:
2006-01-16  Ankit Jain  <[email protected]>

	* ILParser.jay (K_BESTFIT):
	(K_CHARMAPERROR):
	(K_ON):
	(K_OFF): New tokens.
	(pinv_attr | ..): Add rules for the new tokens.

2006-01-16  Ankit Jain  <[email protected]>

	* ILParser.jay (K_UINT): New token.
	(type | K_NATIVE K_UINT): New.

2006-01-15  Ankit Jain  <[email protected]>

	* ILParser.jay (method_decl): Add new "full" syntax specifying overrides.

2006-01-13  Ankit Jain  <[email protected]>

	* ILParser.jay: Update to use codegen.GetTypeRef instead of creating
	TypeRefs.
	Update to use BaseMethodRef.GetGenericMethodRef instead of creating them.

2006-01-13  Ankit Jain  <[email protected]>

	* ILParser.jay: Update to use CodeGen.GetGlobalMethodRef &
	CodeGen.GetGlobalFieldRef instead of creating objects.

2006-01-13  Ankit Jain  <[email protected]>

	* ILParser.jay: Update to use Base* instead of ITypeRef, IClassRef
	& IGenTypeRef.

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

	* ILParser.jay (type | BANG ..): Move !* and !!* rules to ..
	(generic_class_ref): ..this, to allow using VAR/MVARs as class refs.
	Eg. "extends !0"

2006-01-09  Ankit Jain  <[email protected]>

	* ILParser.jay (type_spec : class_ref): Remove.

2006-01-09  Ankit Jain  <[email protected]>

        * ILParser.jay: Update to use GenericParamRef instead of GenericTypeRef.

2006-01-08  Ankit Jain  <[email protected]>

	* ILParser.jay (constraint_decl): Remove. This syntax is no longer used.
	(class_decl | constraint_decl): Remove.

2006-01-07  Ankit Jain  <[email protected]>

	* ILParser.jay: Update to use new GenericParameters class.
	(generic_class_ref| K_CLASS class_ref typars_clause): New.
	Update rules to use generic_class_ref instead of 'K_CLASS class_ref..'
	(constraints_clause): New.
	(constraints): New. Rules for constraints on generic parameters.
	(formal_typar_attr): New. Generic param attributes (.ctor, valuetype, class).
	(formal_typars): Update to use new constraints stuff.


svn path=/branches/mono-1-1-13/mcs/; revision=55669
2006-01-17 09:19:03 +00:00
Gonzalo Paniagua Javier e8c324e6a2 2006-01-17 Gonzalo Paniagua Javier <[email protected]>
* threadpool.c: fix problem (Mac only) when more than one asynchronous
	connect. Fixes bug #77020.


svn path=/branches/mono-1-1-13/mono/; revision=55666
2006-01-17 06:08:53 +00:00
Paolo Molaro a0746ae6c5 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <[email protected]>
* class.c: fixed id assignement for nested interfaces (bug #77275).
	Added also better info for --print-vtable debugging.


svn path=/branches/mono-1-1-13/mono/; revision=55646
2006-01-16 18:27:18 +00:00
Zoltan Varga 8a5afbae36 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=55633
2006-01-16 14:13:37 +00:00
Martin Baulig bcffcd5b81 **** Merged r55614 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55617
2006-01-16 04:08:23 +00:00
Martin Baulig eabeb7d2e2 **** Merged r55613 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55615
2006-01-16 01:09:56 +00:00
Martin Baulig 451614ec61 Fix the incorrect merging in r55424.
svn path=/branches/mono-1-1-13/mcs/; revision=55612
2006-01-16 00:48:12 +00:00
Atsushi Eno 172ee433de merged r55499 from trunk.
svn path=/branches/mono-1-1-13/mcs/; revision=55594
2006-01-15 03:49:32 +00:00
Atsushi Eno 4769716742 merged 55290, 55291, 55309, 55359, 55360, 55364, 55371, 55414, 55415,
55418, 55487, 55493 and 55523 from trunk.


svn path=/branches/mono-1-1-13/mcs/; revision=55593
2006-01-15 03:46:54 +00:00
Zoltan Varga 60e5bcc42d Merge r55583 from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=55584
2006-01-14 21:04:41 +00:00
Miguel de Icaza 0fe9c3f5e7 Backport to the branch the gmcs fixes as well
svn path=/branches/mono-1-1-13/mcs/; revision=55546
2006-01-13 20:17:46 +00:00
Miguel de Icaza ee2bdff675 Backport Ben and Hari's changes
svn path=/branches/mono-1-1-13/mcs/; revision=55545
2006-01-13 20:16:11 +00:00
Gonzalo Paniagua Javier ac504cc3db 2006-01-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWriter.cs: made Write (char) less memory hungry. Thanks to Mike
	Glenn for pointing this out.


svn path=/branches/mono-1-1-13/mcs/; revision=55525
2006-01-13 17:47:43 +00:00
Miguel de Icaza 0d6bd08a90 Backport fix
svn path=/branches/mono-1-1-13/mono/; revision=55521
2006-01-13 16:25:16 +00:00
Gonzalo Paniagua Javier e76f20efbb 2006-01-13 Gonzalo Paniagua Javier <[email protected]>
* RangeValidator.cs: allow empty data from the control. Patch from Marek
	Habersack that fixes bug #77239.


svn path=/branches/mono-1-1-13/mcs/; revision=55511
2006-01-13 14:56:53 +00:00
Atsushi Eno b8fbf2ec20 2006-01-13 Atsushi Enomoto <[email protected]>
(really) merged r55413 and r55428 from trunk.


svn path=/branches/mono-1-1-13/mcs/; revision=55482
2006-01-13 04:05:57 +00:00
Atsushi Eno e8d49a8870 2006-01-13 Atsushi Enomoto <[email protected]>
(really) merged r55360 from trunk.


svn path=/branches/mono-1-1-13/mcs/; revision=55480
2006-01-13 03:59:38 +00:00
Miguel de Icaza 6635c94936 Backport Hari's changes to 1.1.13
svn path=/branches/mono-1-1-13/mcs/; revision=55455
2006-01-12 20:23:54 +00:00
Wade Berrier 0e6e9da90b bump version for 1.1.13.1
svn path=/branches/mono-1-1-13/mono/; revision=55452
2006-01-12 19:30:39 +00:00
Martin Baulig cf532c2e60 **** Merged r55440 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55443
2006-01-12 18:31:51 +00:00
Martin Baulig 9a5238504a ****Merged r55441 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55442
2006-01-12 18:30:48 +00:00
Miguel de Icaza a0f9928e49 Backport this too
svn path=/branches/mono-1-1-13/mono/; revision=55438
2006-01-12 17:42:33 +00:00
Miguel de Icaza b64ac133b7 2006-01-12 Miguel de Icaza <[email protected]>
* PeerCred.cs: Turn PeerCredData into a toplevel class and make it
        internal, so it can be used from Mono.Unix.PeerCred.

2006-01-12  Miguel de Icaza  <[email protected]>

        * PeerCred.cs: Do not define PeerCredData as this is a structure
        known to the runtime.  Instead use the Mono.Posix.PeerCredData
        internal class.



svn path=/branches/mono-1-1-13/mcs/; revision=55437
2006-01-12 17:41:10 +00:00
Miguel de Icaza 3534344b61 Backport patch r55412 for Neale on S390x
svn path=/branches/mono-1-1-13/mono/; revision=55430
2006-01-12 14:52:09 +00:00
Martin Baulig 7ff7a966fb **** Merged r55342 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55426
2006-01-12 10:17:25 +00:00
Martin Baulig 51436c31ee **** Merged r55341 from HEAD ****
svn path=/branches/mono-1-1-13/mono/; revision=55425
2006-01-12 10:17:01 +00:00
Martin Baulig 0c158dc33c **** Merged r55312 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55424
2006-01-12 10:14:17 +00:00
Martin Baulig b1bf3e9ff1 **** Merged r55311 from HEAD ****
svn path=/branches/mono-1-1-13/mcs/; revision=55423
2006-01-12 10:10:52 +00:00
Miguel de Icaza 52a04a859c Backport fix from Neale
svn path=/branches/mono-1-1-13/mono/; revision=55405
2006-01-11 23:26:35 +00:00
Sebastien Pouliot 6f594e13f3 2006-01-11 Sebastien Pouliot <[email protected]>
* Path.cs: Previous fix caused regression of bug #76191. Fixed (again)


svn path=/branches/mono-1-1-13/mcs/; revision=55400
2006-01-11 21:31:59 +00:00
Gonzalo Paniagua Javier 81a1f566ea 2006-01-11 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: fix condition for ContextAvailable.


svn path=/branches/mono-1-1-13/mcs/; revision=55388
2006-01-11 17:24:39 +00:00
Gonzalo Paniagua Javier 0717dd85e9 2006-01-11 Vladimir Krasnov <[email protected]>
* HttpRequest.cs: little fix in MapPath(), virtualPath.Replace
	return value wasnt stored.


svn path=/branches/mono-1-1-13/mcs/; revision=55366
2006-01-11 11:31:33 +00:00
Gonzalo Paniagua Javier d6da946bec 2006-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs: ignore non-integer values for max-age and version.
	Fixes bug #77199. Thanks to Cyrille Colin.


svn path=/branches/mono-1-1-13/mcs/; revision=55356
2006-01-10 23:22:02 +00:00
Gonzalo Paniagua Javier 931932d774 2006-01-10 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: add support for 'src' in <script runat="server">.
	Fixes bug #77150.


svn path=/branches/mono-1-1-13/mcs/; revision=55354
2006-01-10 23:16:31 +00:00
Gonzalo Paniagua Javier 8a77f84436 2006-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: typo in comment.

	* HttpApplicationFactory.cs:
	* HttpApplication.cs: don't discard the application used for running the
	Application_Start event to allow for Redirect/Transfer to be used. Fail
	to get the request/response from the application object as MS does (it
	can still be retrieved through HttpContext.Current.blah). Fixes
	bug #77162.


svn path=/branches/mono-1-1-13/mcs/; revision=55346
2006-01-10 22:03:34 +00:00
Gonzalo Paniagua Javier e73d556bf7 2006-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs: cope with malformed cookies with '=' as value.
	Patch by Cyrille Colin. Fixes bug #77179.


svn path=/branches/mono-1-1-13/mcs/; revision=55308
2006-01-10 16:44:56 +00:00
Gonzalo Paniagua Javier e606120a95 svn path=/branches/mono-1-1-13/mcs/; revision=55305 2006-01-10 16:34:20 +00:00
Gonzalo Paniagua Javier eeec6e8904 2006-01-10 Gonzalo Paniagua Javier <[email protected]>
* Calendar.cs: Modified file.


svn path=/branches/mono-1-1-13/mcs/; revision=55304
2006-01-10 16:32:03 +00:00
Jonathan Pryor 628c8cbae0 * Mono.Unix/Catalog.cs: Don't use
System.Runtime.InteropServices.Marshal.StringToHGlobalAuto(), use
    UnixMarshal.StringToHeap().  We require that the converted string be in
    UTF-8 format, but .NET's Marshal.StringToHGlobalAuto converts to the local
    code page, *not* UTF-8 (Mono's does UTF-8).  UnixMarshal.StringToHeap
    *always* does UTF-8, so use that instead.
  * Mono.Unix/FileTypes.cs: Remove [Flags] attribute -- these aren't bitfield 
    values.
  * Mono.Unix/UnixFileSystemInfo.cs: Fix Is<<Type>> properties -- before it 
    would erroneously say that a symlink was a character device.  (This is 
    because device values are *not* [Flags] values, but code was assuming 
    they were.)
  * Mono.Unix/UnixGroupInfo.cs: Clone the string[] returned from 
    GetMemberNames().  We don't want callers to change the underlying list.
  * Mono.Unix/UnixMarshal.cs: *Actually* put things in alphabetical order (like 
    the comment says).  I can speak english, really I can.

  * Mono.Unix.Native/NativeConvert.cs: s/IsType/IsSet/g: deal with 
    UnixFileSystemInfo method name change.

svn path=/branches/mono-1-1-13/mcs/; revision=55300
2006-01-10 14:44:54 +00:00
Senganal T e6ca6781e1 2006-01-10 Senganal T <[email protected]>
* Test/System.Data/DataViewTest2.cs 
		- Added testcase for bug #77188
	* System.Data/DataRowCollection.cs
		- Added ListChangedEvent to signal reset of the collection.
	* System.Data/DataView.cs
		- Subscribes to the ListChangedEvent of DataRowCollection
		Fixes bug #77188


svn path=/branches/mono-1-1-13/mcs/; revision=55294
2006-01-10 13:24:28 +00:00
Senganal T 852bcf8213 2006-01-10 Senganal T <[email protected]>
* Mono.Data.SqlExpressions/Aggregation.cs
	* Mono.Data.SqlExpressions/Expression.cs
	* System.Data/RelatedDataView.cs
	* System.Data/DataColumn.cs
		- Resolbes a method name clash in IExpression


svn path=/branches/mono-1-1-13/mcs/; revision=55293
2006-01-10 13:21:44 +00:00
Sebastien Pouliot 0738b1b7fa 2006-01-09 Sebastien Pouliot <[email protected]>
* Path.cs: Fix c14n on Windows when the first separator after the root
	isn't '\'. Fix problems for XSP with 1.1.13.


svn path=/branches/mono-1-1-13/mcs/; revision=55267
2006-01-09 22:16:53 +00:00
Zoltan Varga c0c70fc306 Merge from HEAD.
svn path=/branches/mono-1-1-13/mono/; revision=55190
2006-01-07 17:00:01 +00:00
Miguel de Icaza cef2791818 Backport; 2006-01-07 Miguel de Icaza <[email protected]>
* Path.cs (GetTempFilename): Append ".tmp" to the path, some
	external application expect this extension.

svn path=/branches/mono-1-1-13/mcs/; revision=55186
2006-01-07 14:00:16 +00:00
4252 changed files with 49587 additions and 455883 deletions

No files matched your search

+8 -156
View File
@@ -1,173 +1,25 @@
2006-04-21 Alp Toker <alp@atoker.com>
2006-04-25 Wade Berrier <wberrier@novell.com>
* scripts/mono-service.in: Usage info fixes:
Lock file was referred to as .log instead of .lock. Fixes #75724.
$0 was in single-quoted, so not interpreted.
* scripts/mono-find-provides.in: Only scan files that are in the gac.
This allows packages to contain private assemblies that won't conflict
with other packages. Fixes bugzilla.novell.com #144655.
2006-04-13 Chris Toshok <[email protected]>
2006-03-13 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: add system.data section listing the
SqlClient provider. Also add system.web section listing the
membership and role providers. This is here instead of in
web.config because the providers are meant to be available to
non-web applications as well.
2006-04-11 Chris Toshok <[email protected]>
* data/net_2_0/web.config: add the builtin expression builders.
2006-04-11 Gert Driesen <[email protected]>
* scripts/Makefile.am (scripts_2_0): Add 'resgen2'.
2006-04-07 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: oh, and
system.web/anonymousIdentification.
2006-04-07 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: add system.web/membership and
system.web/xhtmlConformance config sections.
2006-04-04 Zoltan Varga <[email protected]>
* configure.in: Add a check and a helpful error message when 'ar' is not found on solaris.
2006-04-01 Zoltan Varga <[email protected]>
* data/mono.supp: Add "Use of uninitialized value of size 8" too.
2006-03-31 Massimiliano Mantione <[email protected]>
* docs/tree-mover.txt: Added tree mover documentation.
Wed, 29 Mar 2006 20:54:05 +0200 Paolo Molaro <[email protected]>
* configure.in, mono/Makefile.am: remove the now unused handles dir
from the build.
2006-03-22 Chris Toshok <[email protected]>
* data/net_2_0/web.config: add RoleManagerModule to httpModules.
* data/net_2_0/machine.config: add system.web/roleManager section
handler.
2006-03-20 Zoltan Varga <[email protected]>
* libmono.vcproj: Add some newly added source files.
2006-03-17 Zoltan Varga <[email protected]>
* libmono.vcproj: Remove os/win32/util.h.
2006-03-09 Vladimir Krasnov <[email protected]>
* Added data/net_1_1/DefaultWsdlHelpGenerator.jvm.aspx
with removed proxy class generation for Grasshopper
2006-03-08 Chris Toshok <[email protected]>
* data/net_2_0/web.config: add a default siteMap section with the
AspNetXmlSiteMapProvider provider.
* data/net_2_0/machine.config: add system.web/siteMap section
info.
2006-03-03 Zoltan Varga <[email protected]>
* configure.in mono/os: Merge the contents of libmonoos to metadata/assembly.c and
get rid of os/unix and os/win32.
Wed Mar 1 12:37:43 CET 2006 Paolo Molaro <[email protected]>
* configure.in: added checks for visibility attribute,
option to disable generics, disabled options string define.
2006-02-27 Raja R Harinath <[email protected]>
* configure.in (runtime/etc/mono/{1.0,2.0}/machine.config):
Fix m4-quoting.
Sat Feb 25 11:53:30 CET 2006 Paolo Molaro <[email protected]>
* configure.in: more feature for --enable-minimal flags.
* data/net_2_0/machine.config: revert r55809, as this change
introduces a 2.0 configuration class, which 1.1.13 doesn't
support.
2006-02-24 Gonzalo Paniagua Javier <[email protected]>
* configure.in: define PLATFORM_BSD.
2006-02-17 Zoltan Varga <[email protected]>
* Makefile.am: Avoid installing mint.pc if mint is not compiled.
2006-02-07 Chris Toshok <[email protected]>
* data/net_2_0/Makefile.am (EXTRA_DIST): add web.config
(mono_DATA): same.
* data/net_2_0/machine.config: remove the system.web section from
here.
* data/net_2_0/web.config: and add it here.
2006-02-02 Carlos Alberto Cortez <[email protected]>
* data/net_2_0/machine.config: Add FtpRequestCreator
to create new instances of System.Net.FtpWebWebRequest.
2006-02-01 Sebastien Pouliot <[email protected]>
* libmono.vcproj: Added new files to the VS.NET build.
* README.vsnet: Updated VS.NET build instructions.
2006-01-26 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: ignore runtime and startup
sections.
2006-01-25 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: ignore mscorlib,
system.runtime.remoting, and strongNames sections.
2006-01-25 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: for system.web, add default
<authorization> section that allows everything. also, add
System.Configuration to system.web/compilation/assemblies.
2006-01-23 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: add System.Configuration to the
list of assemblies in system.web/compilation.
2006-01-23 Martin Baulig <[email protected]>
* configure.in: Added configure check whether the Mono Debugger is
supported on this platform; AC_DEFINE(MONO_DEBUGGER_SUPPORTED) and
also added a `MONO_DEBUGGER_SUPPORTED' automake conditional.
2006-01-13 Raja R Harinath <[email protected]>
* data/net_2_0/machine.config: Fix a couple of typos in type names.
2006-01-10 Raja R Harinath <[email protected]>
* scripts/Makefile.am (scripts_2_0): Add nunit-console2.
2006-01-09 Chris Toshok <[email protected]>
* data/net_2_0/machine.config: switch over to the 2.0
configuration sections for System.Web and System.Web.Services.
Also, add the configProtectedData stuff so we can encrypt config
sections.
2006-01-08 Robert Jordan <[email protected]>
* man/mkbundle.1: Documented environment variables and Windows issues.
2006-01-06 Jonathan Pryor <[email protected]>
* data/config.in: s/libintl/intl/g. Mono.Unix.Catalog DllImports "intl"
-4
View File
@@ -20,12 +20,8 @@ dist-hook:
pkgconfigdir = $(libdir)/pkgconfig
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mint.pc dotnet.pc mono-cairo.pc
else
pkgconfig_DATA= mono.pc dotnet.pc mono-cairo.pc
endif
else
pkgconfig_DATA= mint.pc mono-cairo.pc
endif
noinst_DATA = mono-uninstalled.pc
+6 -13
View File
@@ -25,11 +25,6 @@ This is Mono.
http://www.hpl.hp.com/research/linux/libunwind/download.php4
On Solaris, make sure that you used GNU tar to unpack this package, as
Solaris tar will not unpack this correctly, and you will get strange errors.
On Solaris, make sure that you use the GNU toolchain to build the software.
Optional dependencies:
* libgdiplus
@@ -47,8 +42,7 @@ This is Mono.
make
make install
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390, AMD64, ARM
and PowerPC systems.
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390, AMD64 and PowerPC systems.
If you obtained this as a snapshot, you will need an existing
Mono installation. To upgrade your installation, unpack both
@@ -93,11 +87,10 @@ This is Mono.
If you don't have a working Mono installation, an obvious choice
is to install the latest released packages of 'mono' for your
distribution and running autogen.sh; make; make install in the
mono module directory.
distribution and try from the beginning.
You can also try a slightly more risky approach: this may not work,
so start from the released tarball as detailed above.
You can also try a slightly more risky approach that should work
almost all the time.
This works by first getting the latest version of the 'monolite'
distribution, which contains just enough to run the 'mcs'
@@ -175,7 +168,7 @@ This is Mono.
metadata/
The object system and metadata reader.
mini/
jit/
The Just in Time Compiler.
dis/
@@ -193,7 +186,7 @@ This is Mono.
definition of the CIL bytecodes.
interp/
Interpreter for CLI executables (obsolete).
Interpreter for CLI executables.
arch/
Architecture specific portions.
+12 -21
View File
@@ -1,8 +1,8 @@
README.vsnet Last updated: 2006-02-01
README.vsnet Last updated: 2005-05-26
SVN includes a Visual Studio .NET 2005 solution, mono.sln, and some
projects files to build most of the unmanaged parts in Mono.
SVN now includes a Visual Studio .NET 2005 (beta2) solution, mono.sln,
and some projects files to build most of the unmanaged parts in Mono.
The "mono.sln" solution file contains the VC projects files for:
@@ -30,12 +30,12 @@ REQUIREMENTS
* build the class libraries; and
* test for regressions.
* Visual Studio .NET 2005. Previous Visual Studio versions may work or
requires, hopefully minimal, changes.
* Visual Studio .NET 2005 beta2. Previous Visual Studio versions may
work or requires, hopefully minimal, changes.
* VSDependencies.zip must be decompressed under the /mono/ directory
(otherwise you will need to edit all the projects files). This file can
be downloaded from http://www.go-mono.com/archive/VSDependencies.zip
* VSDependencies.zip must be decompressed under /mono/ (otherwise you
will need to edit all the projects files. This file can be downloaded
from http://www.go-mono.com/archive/VSDependencies.zip
LOCAL CHANGES
@@ -85,11 +85,9 @@ requires a working cygwin environment to create some files (e.g. via
genmdesc, monoburg). This isn't so bad as without cygwin you wouldn't be
able to test Mono properly (see REQUIREMENTS);
[3] Only the Debug target is configured properly (that would be easy to
fix, but would require turning off some optimizations like omitting
stack frames). Anyway there are other issues [1] to fix before switching
to Release and IMHO the _biggest_ advantage to VS.NET is it's debugger/
debugging tools;
[3] Only the Debug target is configured properly (easy to fix). Anyway
there are other issues [1] to fix before switching to Release and IMHO
the _biggest_ advantage to VS.NET is it's debugger/debugging tools;
[4] The C compiler emits _lots_ of warning during compilation. Some
warnings have been turned off for some projects (there was so much that
@@ -103,17 +101,10 @@ Platform SDK (Windows Server 2003 is the latest) to ensure you have the
latest Windows header files. You can download it from:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
[6] Not everyone has VS.NET so it is possible you may have to add some
(new) files to the build from time to time. See "more informations" for
reporting those changes.
[7] Probably a lot more I didn't discover... or has changed since.
[6] Probably a lot more I didn't discover...
MORE INFORMATIONS
Please email <[email protected]> if you have any problem
and/or if there's something wrong/missing in the instructions.
An online version of this file is available at
http://www.mono-project.com/Mono:Windows
+8 -62
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,1.1.15)
AM_INIT_AUTOMAKE(mono,1.1.13.8)
AM_MAINTAINER_MODE
AC_PROG_LN_S
@@ -497,22 +497,16 @@ if test "x$with_xen_opt" = "xyes"; then
])
fi
DISABLED_FEATURES=none
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
reflection_emit, large_code, logging, com, ssa, generics.],
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, reflection_emit.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
AC_MSG_NOTICE([Disabled support for feature: $feature])
done
DISABLED_FEATURES=$enable_minimal
disabled="Disabled: $enable_minimal"
],[])
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
if test "x$mono_feature_disable_aot" = "xyes"; then
AC_DEFINE(DISABLE_AOT, 1, [Disable AOT support])
fi
@@ -537,37 +531,6 @@ if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
fi
if test "x$mono_feature_disable_large_code" = "xyes"; then
AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
fi
if test "x$mono_feature_disable_logging" = "xyes"; then
AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
fi
if test "x$mono_feature_disable_com" = "xyes"; then
AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
fi
if test "x$mono_feature_disable_ssa" = "xyes"; then
AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
fi
if test "x$mono_feature_disable_generics" = "xyes"; then
AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
fi
AC_MSG_CHECKING(for visibility __attribute__)
AC_TRY_COMPILE([], [
void __attribute__ ((visibility ("hidden"))) doit (void) {}
void main () { doit (); }
], [
AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
])
LIBGC_CFLAGS=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
@@ -593,9 +556,6 @@ case "x$gc" in
AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
if test "x$found_gcj_malloc" = "xyes"; then
AC_DEFINE(HAVE_GC_GCJ_MALLOC)
AC_DEFINE_UNQUOTED(USED_GC_NAME, "System Boehm (with typed GC)", [GC description])
else
AC_DEFINE_UNQUOTED(USED_GC_NAME, "System Boehm (no typed GC)", [GC description])
fi
AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
if test "x$found_gc_enable" = "xyes"; then
@@ -624,23 +584,10 @@ case "x$gc" in
# The included libgc contains GCJ support
AC_DEFINE(HAVE_GC_GCJ_MALLOC)
AC_DEFINE(HAVE_GC_ENABLE)
AC_DEFINE_UNQUOTED(USED_GC_NAME, "Included Boehm (with typed GC)", [GC description])
;;
dnl xsgen)
dnl found_boehm=no
dnl gc_headers=no
dnl use_included_gc=no
dnl AC_DEFINE(HAVE_SGEN_GC,1,[Using the simple generational GC.])
dnl AC_DEFINE(HAVE_MOVING_COLLECTOR,1,[The GC can move objects.])
dnl AC_DEFINE(HAVE_WRITE_BARRIERS,1,[The GC needs write barriers.])
dnl AC_DEFINE_UNQUOTED(USED_GC_NAME, "Simple generational", [GC description])
dnl ;;
xnone)
AC_MSG_WARN("Compiling mono without GC.")
AC_DEFINE_UNQUOTED(USED_GC_NAME, "none", [GC description])
AC_DEFINE(HAVE_NULL_GC,1,[No GC support.])
;;
*)
AC_MSG_ERROR([Invalid argument to --with-gc.])
@@ -1547,11 +1494,7 @@ case "$host" in
esac
jit_wanted=true
if test x"$GCC" = xyes; then
# We don't support v8 cpus
CFLAGS="$CFLAGS -Wno-cast-align -mcpu=v9"
fi
if test x"$AR" = xfalse; then
AC_MSG_ERROR([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.])
CFLAGS="$CFLAGS -Wno-cast-align"
fi
;;
alpha*-*-linux* | alpha*-*-osf*)
@@ -1847,7 +1790,7 @@ AC_CONFIG_FILES([runtime/semdel-wrapper],[chmod +x runtime/semdel-wrapper])
AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
[\\/$]* | ?:[\\/]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
@@ -1861,7 +1804,7 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
[\\/$]* | ?:[\\/]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
@@ -1889,6 +1832,8 @@ mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/os/Makefile
mono/os/win32/Makefile
mono/os/unix/Makefile
mono/arch/x86/Makefile
mono/arch/amd64/Makefile
mono/arch/hppa/Makefile
@@ -1907,6 +1852,7 @@ mono/monoburg/Makefile
mono/monograph/Makefile
mono/io-layer/Makefile
mono/mini/Makefile
mono/handles/Makefile
mono/profiler/Makefile
ikvm-native/Makefile
scripts/Makefile
+1 -1
View File
@@ -3,7 +3,7 @@ SUBDIRS = net_1_1 net_2_0
monodir = $(sysconfdir)/mono
EXTRA_DIST = config.in \
browscap.ini mono.supp README
browscap.ini
mono_DATA = config \
browscap.ini
-20
View File
@@ -1,20 +0,0 @@
Files in this directory:
config.in, config:
These files are installed into $prefix/etc/mono and
contain the global mappings of dllnames into native
library names.
browscap.ini
This file contains the browser capabilty database,
this is used by ASP.NET to determine in a per-browser
basis what kind of features it can depend on when
producing the HTML code.
mono.supp
This is a valgrind data file, it lists the warnings
that should be supressed when reporting Mono-related
errors.
net_1_1 and net_2_0
They contain profile-specific data files
-40
View File
@@ -1,40 +0,0 @@
##
## mono-specific suppressions (Boehm-GC) for use with valgrind
##
{
mono - Conditional jump or move depends on uninitialised value
Memcheck:Cond
fun:GC_*
fun:*
obj:/usr/local/bin/mono
}
{
mono - Use of uninitialized value of size 4
Memcheck:Value4
fun:GC_*
fun:*
obj:/usr/local/bin/mono
}
{
mono - Use of uninitialized value of size 8
Memcheck:Value8
fun:GC_*
fun:*
obj:/usr/local/bin/mono
}
{
mono - Use of uninitialized value of size 1
Memcheck:Value1
fun:GC_*
fun:*
obj:/usr/local/bin/mono
}
{
mono - Invalid read of size 4
Memcheck:Addr4
fun:GC_*
fun:*
obj:/usr/local/bin/mono
}
File diff suppressed because it is too large. Load diff
+1 -3
View File
@@ -1,10 +1,8 @@
monodir = $(sysconfdir)/mono/2.0
EXTRA_DIST = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx
DefaultWsdlHelpGenerator.aspx
mono_DATA = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx
+121 -64
View File
@@ -3,49 +3,45 @@
<configuration>
<configSections>
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="xhtmlConformance" type="System.Web.Services.Configuration.XhtmlConformanceSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="strongNames" type="System.Configuration.IgnoreSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.web">
<section name="httpHandlers"
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules"
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="machineKey"
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authentication"
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authorization"
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="globalization"
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trace"
type="System.Web.Configuration.TraceConfigurationHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices"
type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler, System.Web.Services, Version=2.0.0.0 Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webControls"
type="System.Web.Configuration.WebControlsSectionHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation"
type="System.Web.Configuration.CompilationConfigurationHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime"
type="System.Web.Configuration.HttpRuntimeConfigurationHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors"
type="System.Web.Configuration.CustomErrorsConfigHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="pages"
type="System.Web.Configuration.PagesConfigurationHandler, System.Web, Version=2.0.0.0, Culture=neutral" />
<section name="clientTarget"
type="System.Web.Configuration.ClientTargetSectionHandler, System.Web, Version=2.0.0.0, Culture=neutral" />
</sectionGroup>
<sectionGroup name="system.net">
<section name="settings"
type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
type="System.Net.Configuration.NetConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement"
type="System.Net.Configuration.ConnectionManagementHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="authenticationModules"
@@ -57,16 +53,6 @@
</sectionGroup>
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
<providers>
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" keyContainerName="MonoFrameworkConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
<add name="DataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" useMachineProtection="true" keyEntropy="" />
</providers>
</configProtectedData>
<system.net>
<connectionManagement>
<add address="*" maxconnection="2" />
@@ -87,12 +73,97 @@
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
<settings>
<ipv6 enabled="false"/>
</settings>
</system.net>
<system.web>
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"/>
<!--
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<webControls clientScriptsLocation="/web_scripts" />
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
<compilers>
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
warningLevel="1" compilerOptions=""
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
<assemblies>
<!--<add assembly="mscorlib" /> -->
<add assembly="System" />
<add assembly="System.Xml" />
<add assembly="System.Data" />
<add assembly="System.Web" />
<add assembly="System.Web.Services" />
<add assembly="System.Drawing" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
</compilation>
<httpRuntime executionTimeout="90"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100" />
<pages buffer="true"
enableSessionState="true"
autoEventWireup="true"
validateRequest="true" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
</system.web>
<system.runtime.remoting>
<application>
@@ -163,20 +234,6 @@
<map Token="7c307b91aa13d208" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
</pubTokenMapping>
</strongNames>
<system.web>
<membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" />
</providers>
</membership>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" />
</providers>
</roleManager>
</system.web>
</configuration>
-121
View File
@@ -1,121 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<allow users="*" />
</authorization>
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.master" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resources" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.skin" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.browser" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.sitemap" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.webinfo" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vb" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.csproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="RoleManager" type="System.Web.Security.RoleManagerModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"/>
<!--
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<webControls clientScriptsLocation="/web_scripts" />
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
<compilers>
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
warningLevel="1" compilerOptions=""
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
<assemblies>
<!--<add assembly="mscorlib" /> -->
<add assembly="System" />
<add assembly="System.Xml" />
<add assembly="System.Configuration" />
<add assembly="System.Data" />
<add assembly="System.Web" />
<add assembly="System.Web.Services" />
<add assembly="System.Drawing" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
<expressionBuilders>
<add expressionPrefix="Resources"
type="System.Web.Compilation.ResourceExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="ConnectionStrings"
type="System.Web.Compilation.ConnectionStringsExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="AppSettings"
type="System.Web.Compilation.AppSettingsExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</expressionBuilders>
</compilation>
<httpRuntime executionTimeout="90"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
<siteMap enabled="false">
<providers>
<add name="AspNetXmlSiteMapProvider"
description="Default site map provider that reads in .sitemap xml files."
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="Web.sitemap" />
</providers>
</siteMap>
</system.web>
</configuration>
-15
View File
@@ -1,15 +0,0 @@
This is a patch that can be applied to the magic file used by file(1) to
recognize mono assemblies.
Apply it to the magic file (usually in /usr/share/file/magic or
/usr/share/misc/magic) and recompile it with file -C.
--- magic.old 2006-03-24 21:12:25.000000000 +0100
+++ magic 2006-03-24 21:12:17.000000000 +0100
@@ -7205,6 +7205,7 @@
>>>>(0x3c.l+4) leshort 0x290 PA-RISC
>>>>(0x3c.l+22) leshort&0x0100 >0 32-bit
>>>>(0x3c.l+22) leshort&0x1000 >0 system file
+>>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
>>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
>>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
-261
View File
@@ -1,261 +0,0 @@
Purpose
Especially when inlining is active, it can happen that temporary
variables add pressure to the register allocator, producing bad
code.
The idea is that some of these temporaries can be totally eliminated
my moving the MonoInst tree that defines them directly to the use
point in the code (so the name "tree mover").
Please note that this is *not* an optimization: it is mostly a
workaround to issues we have in the regalloc.
Actually, with the new linear IR this will not be possible at all
(there will be no more trees in the code!).
Anyway, this workaround turns out to be useful in the current state
of things...
-----------------------------------------------------------------------
Base logic
If a local is defined by a value which is a proper expression (a tree
of MonoInst, not just another local or a constant), and this definition
is used only once, the tree can be moved directly to the use location,
and the definition eliminated.
Of course, none of the variables used in the tree must be defined in
the code path between the definition and the use, and the tree must be
free of side effects.
We do not handle the cases when the tree is just a local or a constant
because they are handled by copyprop and consprop, respectively.
To make things simpler, we restrict the tree move to the case when:
- the definition and the use are in the same BB, and
- the use is followed by another definition in the same BB (it is not
possible that the 1st value is used again), or alternatively there
is no BB in the whole CFG that contains a use of this local before a
definition (so, again, there is no code path that can lead to a
subsequent use).
To handle this, we maintain an ACT array (Available Copy Tree, similar
to the ACP), where we store the "state" of every local.
Ideally, every local can be in the following state:
[E] Undefined (by a tree, it could be in the ACP but we don't care).
[D] Defined (by a tree), and waiting for a use.
[U] Used, with a tree definition available in the same BB, but still
without a definition following the use (always in the same BB).
Of course state [E] (empty) is the initial one.
Besides, there are two sort of "meta states", or flags:
[W] Still waiting for a use or definition in this BB (we have seen no
occurrence of the local yet).
[X] Used without being previously defined in the same BB (note that if
there is a definition that precedes the use in the same BB, even if
the definition is not a tree or is not available because of side
effects or because the tree value has changed the local is not in
state [X]).
Also note that state [X] is a sort of "global" condition, which if set
in one BB will stay valid for the whole CFG, even if the local will
otherwise change state. The idea of flagging a local as [X] is that if
there is a definition/use pair that reaches the end of a BB, it could
be that there is a CFG path that then leads to the BB flagging it as
[X] (which contains a use), so the tree cannot be moved.
So state [X] will always be set, and never examined in all the state
transitions we will describe.
In practice, we use flag [W] to set state [X]: if, when traversing a
BB, we find a use for a local in state [W], then that local is flagged
[X].
For each BB, we initialize all states to [E] and [W], and then we
traverse the code one inst at a time, and update the variable states
in the ACT in the following ways:
[Definition]
- Flag [W] is cleared.
- All "affected trees" are killed (go from state [D] to [E]).
The "affected trees" are the trees which contain (use) the defined
local, and the rationale is that the tree value changed, so the
tree is no longer available.
- If the local was in state [U], *that* tree move is marked "safe"
(because *this* definition makes us sure that the previous tree
cannot be used again in any way).
The idea is that "safe" moves can happen even if the local is
flagged [X], because the second definition "covers" the use.
The tree move is then saved in the "todo" list (and the affecting
nodes are cleared).
- If the local was defined by a tree, it goes to state [D], the tree
is recorded, and all the locals used in it are marked as "affecting
this tree" (of course these markers are lists, because each local
could affect more than one tree).
[IndirectDefinition]
- All potentially affected trees (in state [D]) are killed.
[Use]
- If the local is still [W], it is flagged [X] (the [W] goes away).
- If the local is in state [D], it goes to state [U].
The tree move must not yet be recorded in the "todo" list, it still
stays in the ACT slot belonging to this local.
Anyway, the "affecting" nodes are updated, because now a definition
of a local used in this tree will affect only "indirect" (or also
"propagated") moves, but not *this* move (see below).
- If the local is in state [U], then the tree cannot be moved (it is
used two times): the move is canceled, and the state goes [E].
- If the local is in state [E], the use is ignored.
[IndirectUse]
- All potentially affected trees (in state [D] or [U]) are killed.
[SideEffect]
- Tree is marked as "unmovable".
Then, at the end of the BB, for each ACT slot:
- If state is [U], the tree move is recorded in the "todo" list, but
flagged "unsafe".
- Anyway, state goes to [E], the [W] flag is set, and all "affecting"
lists are cleared (we get ready to traverse the next BB).
Finally, when all BBs has been scanned, we traverse the "todo" list,
moving all "safe" entries, and moving "unsafe" ones only if their ACT
slot is not flagged [X].
So far, so good.
But there are two issues that make things harder :-(
The first is the concept of "indirect tree move".
It can happen that a tree is scheduled for moving, and its destination
is a use that is located in a second tree, which could also be moved.
The main issue is that a definition of a variable of the 1st tree on
the path between the definition and the use of the 2nd one must prevent
the move.
But which move? The 1st or the 2nd?
Well, any of the two!
The point is, the 2nd move must be prevented *only* if the 1st one
happens: if it is aborted (for an [X] flag or any other reason), the
2nd move is OK, and vice versa...
We must handle this in the following way:
- The ACT must still remember if a slot is scheduled for moving in
this BB, and if it is, all the locals used in the tree.
We say that the slot is in state [M].
Note that [M] is (like [X] and [W]) a sort of "meta state": a local
is flagged [M] when it goes to state [U], and the flag is cleared
when the tree move is cancelled
- A tree that uses a local whose slot is in state [M] is also using all
the locals used by the tree in state [M], but the use is "indirect".
These use nodes are also included in the "affecting" lists.
- The definition of a variable used in an "indirect" way has the
effect of "linking" the two involved tree moves, saying that only one
of the two can happen in practice, but not both.
- When the 2nd tree is scheduled for moving, the 1st one is *still* in
state [M], because a third move could "carry it forward", and all the
*three* moves should be mutually exclusive (to be safe!).
The second tricky complication is the "tree forwarding" that can happen
when copyprop is involved.
It is conceptually similar to the "indirect tree move".
Only, the 2nd tree is not really a tree, it is just the local defined
in the 1st tree move.
It can happen that copyprop will propagate the definition.
We cannot make treeprop do the same job of copyprop, because copyprop
has less constraints, and is therefore more powerful in its scope.
The main issue is that treeprop cannot propagate a tree to *two* uses,
while copyprop is perfectly capable of propagating one definition to
two (or more) different places.
So we must let copyprop do its job otherwise we'll miss optimizations,
but we must also make it play safe with treeprop.
Let's clarify with an example:
a = v1 + v2; //a is defined by a tree, state [D], uses v2 and v2
b = a; //a is used, state [U] with move scheduled, and
//b is defined by a, ACP[b] is a, and b is in state [DC]
c = b + v3; // b is used, goes to state [U]
The real trouble is that copyprop happens *immediately*, while treeprop
is deferred to the end of the CFG traversal.
So, in the 3rd statement, the "b" is immediately turned into an "a" by
copyprop, regardless of what treeprop will do.
Anyway, if we are careful, this is not so bad.
First of all, we must "accept" the fact that in the 3rd statement the
"b" is in fact an "a", as treeprop must happen *after* copyprop.
The real problem is that "a" is used twice: in the 2nd and 3rd lines.
In our usual setup, the 2nd line would set it to [U], and the 3rd line
would kill the move (and set "a" to [E]).
I have tried to play tricks, and reason as of copyprop didn't happen,
but everything becomes really messy.
Instead, we should note that the 2nd line is very likely to be dead.
At least in this BB, copyprop will turn all "b"s into "a"s as long as
it can, and when it cannot, it will be because either "a" or "b" have
been redefined, which would be after the tree move anyway.
So, the reasoning gets different: let's pretend that "b" will be dead.
This will make the "a" use in the 2nd statement useless, so there we
can "reset" "a" to [D], but also take note that if "b" will end up
not being dead, the tree move associated to this [D] must be aborted.
We can detect this in the following way:
- Either "b" is used before being defined in this BB, or
- It will be flagged "unsafe".
Both things are very easy to check.
The only quirk is that the "affecting" lists must not be cleared when
a slot goes to state [U], because a "propagation" could put it back
to state [D] (where those lists are needed, because it can be killed
by a definition to a used slot).
-----------------------------------------------------------------------
Implementation notes
All the implementation runs inside the existing mono_local_cprop
function, and a separate memory pool is used to hold the temporary
data.
A struct, MonoTreeMover, contains the pointers to the pool, the ACT,
the list of scheduled moves and auxiliary things.
This struct is allocated if the tree move pass is requested, and is
then passed along to all the involved functions, which are therefore
aware of the tree mover state.
The ACT is an array of slots, obviously one per local.
Each slot is of type MonoTreeMoverActSlot, and contains the used and
affected locals, a pointer to the pending tree move and the "waiting"
and "unsafe" flags.
The "affecting" lists a built from "dependency nodes", of type
MonoTreeMoverDependencyNode.
Each of the nodes contains the used and affected local, and is in
two lists: the locals used by a slot, and the locals affected by a
slot (obviously a different one).
So, each node means: "variable x is used in tree t, so a definition
of x affects tree t".
The "affecting" lists are doubly linked, to allow for O(1) deletion.
The "used" lists are simply linked, but when they are mantained there
is always a pointer to the last element to allow for O(1) list moving.
When a used list is dismissed (which happens often, any time a node is
killed), its nodes are unlinked from their respective affecting lists
and are then put in a "free" list in the MonoTreeMover to be reused.
Each tree move is represented by a struct (MonoTreeMoverTreeMove),
which contains:
- the definition and use points,
- the "affected" moves (recall the concept of "indirect tree move"),
- the "must be dead" slots (recall "tree forwarding"). and
- a few utility flags.
The tree moves stays in the relevant ACT slot until it is ready to be
scheduled for moving, at which point it is put in a list in the
MonoTreeMover.
The tree moves structs are reused when they are killed, so there is
also a "free" list for them in the MonoTreeMover.
The tree mover code has been added to all the relevant functions that
participate in consprop and copyprop, particularly:
- mono_cprop_copy_values takes care of variable uses (transitions from
states [D] to [U] and [U] to [E] because of killing),
- mono_cprop_invalidate_values takes care of side effects (indirect
accesses, calls...),
- mono_local_cprop_bb sets up and cleans the traversals for each BB,
and for each MonoInst it takes care of variable definitions.
To each of them has been added a MonoTreeMover parameter, which is not
NULL if the tree mover is running.
After mono_local_cprop_bb has run for all BBs, the MonoTreeMover has
the list of all the pending moves, which must be walked to actually
perform the moves (when possible, because "unsafe" flags, "affected"
moves and "must be dead" slots can still have their effects, which
must be handled now because they are fully known only at the end of
the CFG traversal).
+2 -37
View File
@@ -1,42 +1,11 @@
2006-04-05 Zoltan Varga <[email protected]>
* include/private/gcconfig.h (LINUX and SPARC): Applied patch from
David S. Miller <[email protected]>: Do not
use _etest and GC_SysVGetDataStart() to figure out DATASTART.
Instead use either SEARCH_FOR_DATA_START or __environ, based
upon GLIBC version.
2006-03-25 Zoltan Varga <[email protected]>
* configure.in: Applied patch from David S. Miller <[email protected]>: Fix support for sparc/linux.
Mon Mar 20 18:56:21 CET 2006 Paolo Molaro <[email protected]>
* include/gc.h: enable pthread redirection on darwin, too.
* include/gc_pthread_redirects.h: completed from Bryan Berg.
Thu Feb 9 16:20:55 CET 2006 Paolo Molaro <[email protected]>
* os_dep.c, include/private/gcconfig.h, darwin_stop_world.c:
OSX/x86 support, mostly from Geoff Norton <[email protected]>.
Wed Feb 1 18:23:55 CET 2006 Paolo Molaro <[email protected]>
* pthread_support.c, *: back out Zoltan's patch since it's
incorrect.
The correct fix it to execute the cleanup from inside
the thread also when using the __thread var to access the
current GC_thread.
2006-02-01 Zoltan Varga <[email protected]>
* pthread_support.c (GC_thread_deregister_foreign): New public API
function to deregister a foreign thread from the GC.
(GC_destroy_thread_local): Clean up the TLS key too.
Tue Jan 24 12:34:06 CET 2006 Paolo Molaro <[email protected]>
* *: update from upstream changes.
* pthread_support.c: make sure the proper cleanup also happens
when using __thread vars.
2006-01-21 Martin Baulig <[email protected]>
@@ -47,10 +16,6 @@ Tue Jan 24 12:34:06 CET 2006 Paolo Molaro <[email protected]>
* include/libgc-mono-debugger.h: Call the conditional
`_IN_THE_MONO_DEBUGGER', not `IN_MONO_DEBUGGER'.
2006-01-11 Zoltan Varga <[email protected]>
* include/private/gcconfig.h: Undef _FILE_OFFSET_BITS on sparc.
2006-01-03 Geoff Norton <[email protected]>
* darwin_stop_world.c: Merge a patch from Bruce Mitchener that fixes a small
+5 -36
View File
@@ -41,7 +41,7 @@ asm_libgc_sources =
endif
libmonogc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
@@ -49,9 +49,10 @@ backgraph.c win32_threads.c \
pthread_support.c pthread_stop_world.c darwin_stop_world.c \
$(asm_libgc_sources)
# Include THREADDLLIBS here to ensure that the correct versions of
# Include THREADLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
libmonogc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES = @addobjs@
libmonogc_la_LDFLAGS = -version-info 1:2:0
@@ -68,48 +69,16 @@ EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
AM_CFLAGS = @GC_CFLAGS@
if CPLUSPLUS
extra_checks = test_cpp
else
extra_checks =
endif
#check_PROGRAMS = gctest $(extra_checks)
#test.o: $(srcdir)/tests/test.c
# $(COMPILE) -c $(srcdir)/tests/test.c
# Using $< in the above seems to fail with the HP/UX on Itanium make.
#test_cpp.o: $(srcdir)/tests/test_cpp.cc
# $(CXXCOMPILE) -c $(srcdir)/tests/test_cpp.cc
## FIXME: this is probably the reason why some files from BUILT_SOURCES
## are included in the distribution
# gctest_OBJECTS = test.o
#gctest_SOURCES = tests/test.c
#gctest_LDADD = ./libgc.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
#test_cpp_SOURCES = tests/test_cpp.cc
#test_cpp_LDADD = ./libgc.la ./libgccpp.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
#TESTS = gctest $(extra_checks)
## FIXME: relies on internal code generated by automake.
all_objs = @addobjs@ $(libgc_la_OBJECTS)
$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
## FIXME: we shouldn't have to do this, but automake forces us to.
if COMPILER_XLC
## XLC neither requires nor tolerates the unnecessary assembler goop
ASM_CPP_OPTIONS =
else
## We use -Wp,-P to strip #line directives. Irix `as' chokes on
## these.
ASM_CPP_OPTIONS = -Wp,-P -x assembler-with-cpp
endif
.s.lo:
## We use -Wp,-P to strip #line directives. Irix `as' chokes on
## these.
$(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
$(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
## We have our own definition of LTCOMPILE because we want to use our
## CFLAGS, not those passed in from the top level make.
+9 -14
View File
@@ -36,7 +36,7 @@ CFLAGS= -O -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_
# -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
# To build the parallel collector in a static library on HP/UX,
# add to the above:
# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L
# To build the thread-safe collector on Tru64, add to the above:
# -pthread -DGC_OSF1_THREADS
@@ -70,11 +70,10 @@ HOSTCFLAGS=$(CFLAGS)
# Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads.
# see README.linux. -D_REENTRANT may also be required.
# -DGC_OSF1_THREADS enables support for Tru64 pthreads.
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
# -DGC_OSF1_THREADS enables support for Tru64 pthreads. Untested.
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads. Untested.
# Appeared to run into some underlying thread problems.
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
# -DGC_AIX_THREADS enables support for IBM AIX threads.
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads. Untested.
# -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
# See README.DGUX386.
# -DGC_WIN32_THREADS enables support for win32 threads. That makes sense
@@ -234,8 +233,8 @@ HOSTCFLAGS=$(CFLAGS)
# -DTHREAD_LOCAL_ALLOC defines GC_local_malloc(), GC_local_malloc_atomic()
# and GC_local_gcj_malloc(). Needed for gc_gcj.h interface. These allocate
# in a way that usually does not involve acquisition of a global lock.
# Currently works only on platforms such as Linux which use pthread_support.c.
# Recommended for multiprocessors.
# Currently requires -DGC_LINUX_THREADS, but should be easy to port to
# other pthreads environments. Recommended for multiprocessors.
# -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
# "__thread" thread-local variables. This is the default in HP/UX. It
# may help performance on recent Linux installations. (It failed for
@@ -277,10 +276,6 @@ HOSTCFLAGS=$(CFLAGS)
# -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
# by the indicated amount before trying to interpret them. Applied
# after POINTER_MASK. EXPERIMENTAL. See also the preceding macro.
# -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
# stack bounds in the same way as other pthread ports, without trying to
# walk the frames onthe stack. This is recommended only as a fallback
# for applications that don't support proper stack unwinding.
#
CXXFLAGS= $(CFLAGS)
@@ -288,9 +283,9 @@ AR= ar
RANLIB= ranlib
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o aix_irix_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c aix_irix_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC
@@ -329,7 +324,7 @@ DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
doc/simple_example.html
TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
tests/leak_test.c tests/thread_leak_test.c tests/middle.c
tests/leak_test.c tests/thread_leak_test.c
GNU_BUILD_FILES= configure.in Makefile.am configure acinclude.m4 \
libtool.m4 install-sh configure.host Makefile.in \
+1 -1
View File
@@ -1,4 +1,4 @@
# Makefile for Windows NT. Assumes Microsoft compiler.
# Makefile for Windows NT. Assumes Microsoft compiler, and a single thread.
# DLLs are included in the root set under NT, but not under win32S.
# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
+10 -18
View File
@@ -111,7 +111,7 @@ void GC_print_hblkfreelist()
for (i = 0; i <= N_HBLK_FLS; ++i) {
h = GC_hblkfreelist[i];
# ifdef USE_MUNMAP
if (0 != h) GC_printf1("Free list %ld:\n",
if (0 != h) GC_printf1("Free list %ld (Total size %ld):\n",
(unsigned long)i);
# else
if (0 != h) GC_printf2("Free list %ld (Total size %ld):\n",
@@ -133,12 +133,10 @@ void GC_print_hblkfreelist()
h = hhdr -> hb_next;
}
}
# ifndef USE_MUNMAP
if (total_free != GC_large_free_bytes) {
if (total_free != GC_large_free_bytes) {
GC_printf1("GC_large_free_bytes = %lu (INCONSISTENT!!)\n",
(unsigned long) GC_large_free_bytes);
}
# endif
}
GC_printf1("Total of %lu bytes on free list\n", (unsigned long)total_free);
}
@@ -183,7 +181,7 @@ void GC_dump_regions()
hhdr = HDR(p);
GC_printf1("\t0x%lx ", (unsigned long)p);
if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
GC_printf1("Missing header!!(%ld)\n", hhdr);
GC_printf1("Missing header!!\n", hhdr);
p += HBLKSIZE;
continue;
}
@@ -285,8 +283,8 @@ int n;
GET_HDR(hhdr -> hb_prev, phdr);
phdr -> hb_next = hhdr -> hb_next;
}
FREE_ASSERT(GC_free_bytes[index] >= hhdr -> hb_sz);
INCR_FREE_BYTES(index, - (signed_word)(hhdr -> hb_sz));
FREE_ASSERT(GC_free_bytes[index] >= 0);
if (0 != hhdr -> hb_next) {
hdr * nhdr;
GC_ASSERT(!IS_FORWARDING_ADDR_OR_NIL(NHDR(hhdr)));
@@ -470,11 +468,7 @@ int index;
if (total_size == bytes) return h;
rest = (struct hblk *)((word)h + bytes);
rest_hdr = GC_install_header(rest);
if (0 == rest_hdr) {
/* This may be very bad news ... */
WARN("Header allocation failed: Dropping block.\n", 0);
return(0);
}
if (0 == rest_hdr) return(0);
rest_hdr -> hb_sz = total_size - bytes;
rest_hdr -> hb_flags = 0;
# ifdef GC_ASSERTIONS
@@ -590,9 +584,8 @@ int n;
GET_HDR(hbp, hhdr);
size_avail = hhdr->hb_sz;
if (size_avail < size_needed) continue;
if (size_avail != size_needed
&& !GC_use_entire_heap
&& !GC_dont_gc
if (!GC_use_entire_heap
&& size_avail != size_needed
&& USED_HEAP_SIZE >= GC_requested_heapsize
&& !TRUE_INCREMENTAL && GC_should_collect()) {
# ifdef USE_MUNMAP
@@ -609,8 +602,7 @@ int n;
/* If we are deallocating lots of memory from */
/* finalizers, fail and collect sooner rather */
/* than later. */
if (WORDS_TO_BYTES(GC_finalizer_mem_freed)
> (GC_heapsize >> 4)) {
if (GC_finalizer_mem_freed > (GC_heapsize >> 4)) {
continue;
}
# endif /* !USE_MUNMAP */
@@ -700,7 +692,7 @@ int n;
struct hblk * h;
struct hblk * prev = hhdr -> hb_prev;
GC_words_wasted += BYTES_TO_WORDS(total_size);
GC_words_wasted += total_size;
GC_large_free_bytes -= total_size;
GC_remove_from_fl(hhdr, n);
for (h = hbp; h < limit; h++) {
+11 -25
View File
@@ -92,16 +92,6 @@ char * GC_copyright[] =
# include "version.h"
#if defined(SAVE_CALL_CHAIN) && \
!(defined(REDIRECT_MALLOC) && defined(GC_HAVE_BUILTIN_BACKTRACE))
# define SAVE_CALL_CHAIN_IN_GC
/* This is only safe if the call chain save mechanism won't end up */
/* calling GC_malloc. The GNU C library documentation suggests */
/* that backtrace doesn't use malloc, but at least the initial */
/* call in some versions does seem to invoke the dynamic linker, */
/* which uses malloc. */
#endif
/* some more variables */
extern signed_word GC_mem_found; /* Number of reclaimed longwords */
@@ -114,6 +104,8 @@ word GC_free_space_divisor = 3;
extern GC_bool GC_collection_in_progress();
/* Collection is in progress, or was abandoned. */
extern GC_bool GC_print_back_height;
int GC_never_stop_func GC_PROTO((void)) { return(0); }
unsigned long GC_time_limit = TIME_LIMIT;
@@ -141,7 +133,7 @@ int GC_n_attempts = 0; /* Number of attempts at finishing */
if (GC_print_stats) {
GC_printf0("Abandoning stopped marking after ");
GC_printf1("%lu msecs", (unsigned long)time_diff);
GC_printf1("(attempt %ld)\n", (unsigned long) GC_n_attempts);
GC_printf1("(attempt %d)\n", (unsigned long) GC_n_attempts);
}
# endif
return(1);
@@ -206,8 +198,7 @@ word GC_adj_words_allocd()
/* had been reallocated this round. Finalization is user */
/* visible progress. And if we don't count this, we have */
/* stability problems for programs that finalize all objects. */
if ((GC_words_wasted >> 3) < result)
result += GC_words_wasted;
result += GC_words_wasted;
/* This doesn't reflect useful work. But if there is lots of */
/* new fragmentation, the same is probably true of the heap, */
/* and the collection will be correspondingly cheaper. */
@@ -232,8 +223,6 @@ void GC_clear_a_few_frames()
{
# define NWORDS 64
word frames[NWORDS];
/* Some compilers will warn that frames was set but never used. */
/* That's the whole idea ... */
register int i;
for (i = 0; i < NWORDS; i++) frames[i] = 0;
@@ -310,7 +299,7 @@ void GC_maybe_gc()
# endif
if (GC_stopped_mark(GC_time_limit == GC_TIME_UNLIMITED?
GC_never_stop_func : GC_timeout_stop_func)) {
# ifdef SAVE_CALL_CHAIN_IN_GC
# ifdef SAVE_CALL_CHAIN
GC_save_callers(GC_last_stack);
# endif
GC_finish_collection();
@@ -379,7 +368,7 @@ GC_stop_func stop_func;
}
GC_invalidate_mark_state(); /* Flush mark stack. */
GC_clear_marks();
# ifdef SAVE_CALL_CHAIN_IN_GC
# ifdef SAVE_CALL_CHAIN
GC_save_callers(GC_last_stack);
# endif
GC_is_full_gc = TRUE;
@@ -434,7 +423,7 @@ int n;
for (i = GC_deficit; i < GC_RATE*n; i++) {
if (GC_mark_some((ptr_t)0)) {
/* Need to finish a collection */
# ifdef SAVE_CALL_CHAIN_IN_GC
# ifdef SAVE_CALL_CHAIN
GC_save_callers(GC_last_stack);
# endif
# ifdef PARALLEL_MARK
@@ -971,7 +960,7 @@ word n;
# endif
expansion_slop = WORDS_TO_BYTES(min_words_allocd()) + 4*MAXHINCR*HBLKSIZE;
if (GC_last_heap_addr == 0 && !((word)space & SIGNB)
|| (GC_last_heap_addr != 0 && GC_last_heap_addr < (ptr_t)space)) {
|| GC_last_heap_addr != 0 && GC_last_heap_addr < (ptr_t)space) {
/* Assume the heap is growing up */
GC_greatest_plausible_heap_addr =
(GC_PTR)GC_max((ptr_t)GC_greatest_plausible_heap_addr,
@@ -1040,9 +1029,9 @@ word needed_blocks;
GC_bool ignore_off_page;
{
if (!GC_incremental && !GC_dont_gc &&
((GC_dont_expand && GC_words_allocd > 0)
|| (GC_fo_entries > (last_fo_entries + 500) && (last_words_finalized || GC_words_finalized))
|| GC_should_collect())) {
(GC_dont_expand && GC_words_allocd > 0
|| (GC_fo_entries > (last_fo_entries + 500) && (last_words_finalized || GC_words_finalized))
|| GC_should_collect())) {
GC_gcollect_inner();
last_fo_entries = GC_fo_entries;
last_words_finalized = GC_words_finalized;
@@ -1053,9 +1042,6 @@ GC_bool ignore_off_page;
if (blocks_to_get > MAXHINCR) {
word slop;
/* Get the minimum required to make it likely that we */
/* can satisfy the current request in the presence of black- */
/* listing. This will probably be more than MAXHINCR. */
if (ignore_off_page) {
slop = 4;
} else {
+13 -12
View File
@@ -1,3 +1,4 @@
# $Id$
.arch ev6
.text
@@ -11,13 +12,13 @@ GC_push_regs:
.mask 0x04000000, 0
.frame $sp, 16, $26, 0
/* $0 integer result */
/* $1-$8 temp regs - not preserved cross calls */
/* $9-$15 call saved regs */
/* $16-$21 argument regs - not preserved cross calls */
/* $22-$28 temp regs - not preserved cross calls */
/* $29 global pointer - not preserved cross calls */
/* $30 stack pointer */
# $0 integer result
# $1-$8 temp regs - not preserved cross calls
# $9-$15 call saved regs
# $16-$21 argument regs - not preserved cross calls
# $22-$28 temp regs - not preserved cross calls
# $29 global pointer - not preserved cross calls
# $30 stack pointer
# define call_push(x) \
mov x, $16; \
@@ -32,12 +33,12 @@ GC_push_regs:
call_push($14)
call_push($15)
/* $f0-$f1 floating point results */
/* $f2-$f9 call saved regs */
/* $f10-$f30 temp regs - not preserved cross calls */
# $f0-$f1 floating point results
# $f2-$f9 call saved regs
# $f10-$f30 temp regs - not preserved cross calls
/* Use the most efficient transfer method for this hardware. */
/* Bit 1 detects the FIX extension, which includes ftoit. */
# Use the most efficient transfer method for this hardware.
# Bit 1 detects the FIX extension, which includes ftoit.
amask 2, $0
bne $0, $use_stack
+12 -31
View File
@@ -85,7 +85,7 @@ static back_edges * new_back_edges(void)
{
if (0 == back_edge_space) {
back_edge_space = (back_edges *)
GET_MEM(MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
sbrk(MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
}
if (0 != avail_back_edges) {
back_edges * result = avail_back_edges;
@@ -113,31 +113,17 @@ static void deallocate_back_edges(back_edges *p)
/* Table of objects that are currently on the depth-first search */
/* stack. Only objects with in-degree one are in this table. */
/* Other objects are identified using HEIGHT_IN_PROGRESS. */
/* FIXME: This data structure NEEDS IMPROVEMENT. */
#define INITIAL_IN_PROGRESS 10000
/* This data structure NEEDS IMPROVEMENT. */
#define MAX_IN_PROGRESS 10000
static ptr_t * in_progress_space = 0;
static size_t in_progress_size = 0;
static size_t n_in_progress = 0;
static int n_in_progress = 0;
static void push_in_progress(ptr_t p)
{
if (n_in_progress >= in_progress_size)
if (in_progress_size == 0) {
in_progress_size = INITIAL_IN_PROGRESS;
in_progress_space = (ptr_t *)GET_MEM(in_progress_size * sizeof(ptr_t));
} else {
ptr_t * new_in_progress_space;
in_progress_size *= 2;
new_in_progress_space = (ptr_t *)
GET_MEM(in_progress_size * sizeof(ptr_t));
BCOPY(in_progress_space, new_in_progress_space,
n_in_progress * sizeof(ptr_t));
in_progress_space = new_in_progress_space;
/* FIXME: This just drops the old space. */
}
if (in_progress_space == 0)
ABORT("MAKE_BACK_GRAPH: Out of in-progress space: "
"Huge linear data structure?");
in_progress_space = sbrk(MAX_IN_PROGRESS * sizeof(ptr_t));
if (n_in_progress == MAX_IN_PROGRESS)
ABORT("Exceeded MAX_IN_PROGRESS");
in_progress_space[n_in_progress++] = p;
}
@@ -332,8 +318,8 @@ static void add_back_edges(ptr_t p, word n_words, word gc_descr)
}
}
/* Rebuild the representation of the backward reachability graph. */
/* Does not examine mark bits. Can be called before GC. */
/* Rebuild the reprentation of the backward reachability graph. */
/* Does not examine mark bits. Can be called before GC. */
void GC_build_back_graph(void)
{
GC_apply_to_each_object(add_back_edges);
@@ -438,20 +424,15 @@ static void update_max_height(ptr_t p, word n_words, word gc_descr)
}
}
word GC_max_max_height = 0;
void GC_traverse_back_graph(void)
{
static word max_max_height = 0;
GC_max_height = 0;
GC_apply_to_each_object(update_max_height);
}
void GC_print_back_graph_stats(void)
{
GC_printf2("Maximum backwards height of reachable objects at GC %lu is %ld\n",
(unsigned long) GC_gc_no, GC_max_height);
if (GC_max_height > GC_max_max_height) {
GC_max_max_height = GC_max_height;
if (GC_max_height > max_max_height) {
max_max_height = GC_max_height;
GC_printf0("The following unreachable object is last in a longest chain "
"of unreachable objects:\n");
GC_print_heap_obj(GC_deepest_obj);
+26 -37
View File
@@ -15,9 +15,9 @@
dnl Process this file with autoconf to produce configure.
AC_PREREQ(2.53)
AC_INIT(libgc-mono, 6.6, [email protected])
AC_INIT(libgc-mono, 6.3alpha6, [email protected])
AM_INIT_AUTOMAKE(libgc-mono, 6.6, no-define)
AM_INIT_AUTOMAKE(libgc-mono, 6.2, no-define)
AC_CONFIG_SRCDIR(gcj_mlc.c)
AC_CANONICAL_HOST
@@ -67,15 +67,14 @@ AC_ARG_ENABLE(cplusplus,
)
INCLUDES=-I${srcdir}/include
THREADDLLIBS=
## Libraries needed to support dynamic loading and/or threads.
THREADLIBS=
case "$THREADS" in
no | none | single)
THREADS=none
;;
posix | pthreads)
THREADS=posix
THREADDLLIBS=-lpthread
THREADLIBS=-lpthread
case "$host" in
x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
AC_DEFINE(GC_LINUX_THREADS)
@@ -101,7 +100,7 @@ case "$THREADS" in
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
THREADDLLIBS="-lpthread -lrt"
THREADLIBS="-lpthread -lrt"
;;
*-*-freebsd4*)
AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
@@ -112,16 +111,22 @@ case "$THREADS" in
INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
fi
if test "x$PTHREAD_LIBS" = "x"; then
THREADDLLIBS=-pthread
THREADLIBS=-pthread
else
THREADDLLIBS=$PTHREAD_LIBS
THREADLIBS=$PTHREAD_LIBS
fi
;;
*-*-freebsd5*)
AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
AC_DEFINE(GC_FREEBSD_THREADS)
INCLUDES="$INCLUDES -pthread"
THREADDLLIBS=-pthread
if test "x$PTHREAD_CFLAGS" != "x"; then
INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
fi
if test "x$PTHREAD_LIBS" = "x"; then
THREADLIBS=-pthread
else
THREADLIBS="$PTHREAD_LIBS"
fi
;;
*-*-freebsd6*)
AC_DEFINE(GC_FREEBSD_THREADS)
@@ -129,9 +134,9 @@ case "$THREADS" in
INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
fi
if test "x$PTHREAD_LIBS" = "x"; then
THREADDLLIBS=-pthread
THREADLIBS=-pthread
else
THREADDLLIBS="$PTHREAD_LIBS"
THREADLIBS="$PTHREAD_LIBS"
fi
;;
*-*-solaris*)
@@ -160,10 +165,7 @@ case "$THREADS" in
# Measurements havent yet been done.
fi
INCLUDES="$INCLUDES -pthread"
THREADDLLIBS="-lpthread -lrt"
;;
*)
AC_MSG_ERROR("Pthreads not supported by the GC on this platform.")
THREADLIBS="-lpthread -lrt"
;;
esac
;;
@@ -177,9 +179,9 @@ case "$THREADS" in
;;
dgux386)
THREADS=dgux386
AC_MSG_RESULT($THREADDLLIBS)
AC_MSG_RESULT($THREADLIBS)
# Use pthread GCC switch
THREADDLLIBS=-pthread
THREADLIBS=-pthread
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
fi
@@ -191,7 +193,7 @@ case "$THREADS" in
;;
aix)
THREADS=posix
THREADDLLIBS=-lpthread
THREADLIBS=-lpthread
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
;;
@@ -202,7 +204,7 @@ case "$THREADS" in
AC_MSG_ERROR($THREADS is an unknown thread package)
;;
esac
AC_SUBST(THREADDLLIBS)
AC_SUBST(THREADLIBS)
case "$host" in
powerpc-*-darwin*)
@@ -211,25 +213,12 @@ case "$host" in
esac
AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
AC_MSG_CHECKING(for xlc)
AC_TRY_COMPILE([],[
#ifndef __xlC__
# error
#endif
], [compiler_xlc=yes], [compiler_xlc=no])
AC_MSG_RESULT($compiler_xlc)
AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
# the darwin stack-frame-walking code is completely broken on xlc
AC_DEFINE(DARWIN_DONT_PARSE_STACK)
fi
# We never want libdl on darwin. It is a fake libdl that just ends up making
# dyld calls anyway
case "$host" in
*-*-darwin*) ;;
*)
AC_CHECK_LIB(dl, dlopen, THREADDLLIBS="$THREADDLLIBS -ldl")
AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
;;
esac
@@ -330,7 +319,7 @@ case "$host" in
machdep="sparc_mach_dep.lo"
AC_DEFINE(SUNOS53_SHARED_LIB)
;;
sparc*-sun-solaris2.*)
sparc-sun-solaris2.*)
machdep="sparc_mach_dep.lo"
;;
ia64-*-*)
@@ -392,10 +381,10 @@ AC_MSG_RESULT($THREADS)
dnl As of 4.13a2, the collector will not properly work on Solaris when
dnl built with gcc and -O. So we remove -O in the appropriate case.
dnl Not needed anymore on Solaris.
dnl
AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
case "$host" in
*aix*)
sparc-sun-solaris2*|*aix*)
if test "$GCC" = yes; then
AC_MSG_RESULT(yes)
new_CFLAGS=
+3 -3
View File
@@ -59,7 +59,7 @@ static int extract_conv_spec(CORD_pos source, char *buf,
register int result = 0;
register int current_number = 0;
register int saw_period = 0;
register int saw_number = 0;
register int saw_number;
register int chars_so_far = 0;
register char current;
@@ -243,7 +243,7 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args)
char * str = va_arg(args, char *);
register char c;
while ((c = *str++)) {
while (c = *str++) {
CORD_ec_append(result, c);
}
goto done;
@@ -320,7 +320,7 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args)
if (buf != result[0].ec_bufptr) {
register char c;
while ((c = *buf++)) {
while (c = *buf++) {
CORD_ec_append(result, c);
}
} else {
+1 -1
View File
@@ -221,7 +221,7 @@ void test_printf()
if (CORD_cmp(result, result2) != 0)ABORT("CORD_sprintf goofed 5");
}
int main()
main()
{
# ifdef THINK_C
printf("cordtest:\n");
+15 -129
View File
@@ -12,33 +12,23 @@
Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then
it must set up a stack frame just like routines that call other routines."
*/
#ifdef POWERPC
# if CPP_WORDSZ == 32
# define PPC_RED_ZONE_SIZE 224
# elif CPP_WORDSZ == 64
# define PPC_RED_ZONE_SIZE 320
# endif
#endif
#define PPC_RED_ZONE_SIZE 224
/* Not 64-bit clean. Wait until Apple defines their 64-bit ABI */
typedef struct StackFrame {
unsigned long savedSP;
unsigned long savedCR;
unsigned long savedLR;
unsigned long reserved[2];
unsigned long savedRTOC;
unsigned int savedSP;
unsigned int savedCR;
unsigned int savedLR;
unsigned int reserved[2];
unsigned int savedRTOC;
} StackFrame;
unsigned long FindTopOfStack(unsigned int stack_start) {
unsigned int FindTopOfStack(unsigned int stack_start) {
StackFrame *frame;
if (stack_start == 0) {
# ifdef POWERPC
# if CPP_WORDSZ == 32
__asm__ volatile("lwz %0,0(r1)" : "=r" (frame));
# else
__asm__ volatile("ldz %0,0(r1)" : "=r" (frame));
# endif
# endif
__asm__ volatile("lwz %0,0(r1)" : "=r" (frame));
} else {
frame = (StackFrame *)stack_start;
}
@@ -47,7 +37,7 @@ unsigned long FindTopOfStack(unsigned int stack_start) {
/* GC_printf1("FindTopOfStack start at sp = %p\n", frame); */
# endif
do {
if (frame->savedSP == 0) break;
if (frame->savedSP == NULL) break;
/* if there are no more stack frames, stop */
frame = (StackFrame*)frame->savedSP;
@@ -63,108 +53,9 @@ unsigned long FindTopOfStack(unsigned int stack_start) {
/* GC_printf1("FindTopOfStack finish at sp = %p\n", frame); */
# endif
return (unsigned long)frame;
return (unsigned int)frame;
}
#ifdef DARWIN_DONT_PARSE_STACK
void GC_push_all_stacks() {
int i;
kern_return_t r;
GC_thread p;
pthread_t me;
ptr_t lo, hi;
#if defined(POWERPC)
ppc_thread_state_t state;
#elif defined(I386)
i386_thread_state_t state;
#else
# error FIXME for non-x86 || ppc architectures
#endif
mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
me = pthread_self();
if (!GC_thr_initialized) GC_thr_init();
for(i=0;i<THREAD_TABLE_SZ;i++) {
for(p=GC_threads[i];p!=0;p=p->next) {
if(p -> flags & FINISHED) continue;
if(pthread_equal(p->id,me)) {
lo = GC_approx_sp();
} else {
/* Get the thread state (registers, etc) */
r = thread_get_state(
p->stop_info.mach_thread,
MACHINE_THREAD_STATE,
(natural_t*)&state,
&thread_state_count);
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
#if defined(I386)
lo = state.esp;
GC_push_one(state.eax);
GC_push_one(state.ebx);
GC_push_one(state.ecx);
GC_push_one(state.edx);
GC_push_one(state.edi);
GC_push_one(state.esi);
GC_push_one(state.ebp);
#elif defined(POWERPC)
lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE);
GC_push_one(state.r0);
GC_push_one(state.r2);
GC_push_one(state.r3);
GC_push_one(state.r4);
GC_push_one(state.r5);
GC_push_one(state.r6);
GC_push_one(state.r7);
GC_push_one(state.r8);
GC_push_one(state.r9);
GC_push_one(state.r10);
GC_push_one(state.r11);
GC_push_one(state.r12);
GC_push_one(state.r13);
GC_push_one(state.r14);
GC_push_one(state.r15);
GC_push_one(state.r16);
GC_push_one(state.r17);
GC_push_one(state.r18);
GC_push_one(state.r19);
GC_push_one(state.r20);
GC_push_one(state.r21);
GC_push_one(state.r22);
GC_push_one(state.r23);
GC_push_one(state.r24);
GC_push_one(state.r25);
GC_push_one(state.r26);
GC_push_one(state.r27);
GC_push_one(state.r28);
GC_push_one(state.r29);
GC_push_one(state.r30);
GC_push_one(state.r31);
#else
# error FIXME for non-x86 || ppc architectures
#endif
} /* p != me */
if(p->flags & MAIN_THREAD)
hi = GC_stackbottom;
else
hi = p->stack_end;
#if DEBUG_THREADS
GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n",
(unsigned long) p -> id,
(unsigned long) lo,
(unsigned long) hi
);
#endif
GC_push_all_stack(lo,hi);
} /* for(p=GC_threads[i]...) */
} /* for(i=0;i<THREAD_TABLE_SZ...) */
}
#else /* !DARWIN_DONT_PARSE_STACK; Use FindTopOfStack() */
void GC_push_all_stacks() {
int i;
kern_return_t r;
@@ -184,12 +75,8 @@ void GC_push_all_stacks() {
lo = GC_approx_sp();
hi = (ptr_t)FindTopOfStack(0);
} else {
# if defined(POWERPC)
# if CPP_WORDSZ == 32
# ifdef POWERPC
ppc_thread_state_t info;
# else
ppc_thread_state64_t info;
# endif
mach_msg_type_number_t outCount = THREAD_STATE_MAX;
r = thread_get_state(thread, MACHINE_THREAD_STATE,
(natural_t *)&info, &outCount);
@@ -269,7 +156,6 @@ void GC_push_all_stacks() {
} /* for(p=GC_threads[i]...) */
vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
}
#endif /* !DARWIN_DONT_PARSE_STACK */
static mach_port_t GC_mach_handler_thread;
static int GC_use_mach_handler_thread = 0;
@@ -440,8 +326,6 @@ void GC_start_world()
kern_return_t kern_result;
thread_act_array_t act_list;
mach_msg_type_number_t listcount;
struct thread_basic_info info;
mach_msg_type_number_t outCount = THREAD_INFO_MAX;
# if DEBUG_THREADS
GC_printf0("World starting\n");
@@ -468,6 +352,8 @@ void GC_start_world()
# endif
continue;
}
struct thread_basic_info info;
mach_msg_type_number_t outCount = THREAD_INFO_MAX;
kern_result = thread_info(thread, THREAD_BASIC_INFO,
(thread_info_t)&info, &outCount);
if(kern_result != KERN_SUCCESS) continue;
+1 -1
View File
@@ -28,7 +28,7 @@ are GPL'ed, but with an exception that should cover all uses in the
collector. (If you are concerned about such things, I recommend you look
at the notice in config.guess or ltmain.sh.)
This is version 6.6 of a conservative garbage collector for C and C++.
This is version 6.3alpha6 of a conservative garbage collector for C and C++.
You might find a more recent version of this at
-168
View File
@@ -2076,175 +2076,7 @@ Since 6.3alpha5:
- Remove ltconfig, clean up configure messages for DGUX (thanks to
Adrian Bunk for the patches).
- Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
Since gc6.3alpha6:
- Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
- Very large allocations could cause a collector hang. Correct
calculation of GC_collect_at_heapsize.
- GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
was defined.
- The generic GC_THREADS macro didn't work correctly on Solaris,
since the implementation failed to include gc_config_macros.h
before deciding whether or not to compile the rest of the file.
- Threadlibs.c failed to expand the generic GC_THREADS macro.
- Correct MacOSX thread stop code. (Thanks to Dick Porter.)
- SMALL_OBJ definition was off by one. This could cause crashes
at startup. (Thanks to Zoltan Varga for narrowing this down to
a trivial test case.)
- Integrate Paolo Molara's patch to deal with a race in the Darwin
thread stopping code.
- Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
implementation. The old approach appears to have been broken by
recent kernels.
- Add GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h. (Thanks
to Andrew Begel.)
- Fix GC_task_self declaration in os_dep.c. (Thanks to Andrew Pinski.)
- Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
Since 6.3:
- Merge gcconfig.h changes from gcc tree.
- Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
aix_irix_threads.c, and solaris_threads.c to get thread definitions.
- Start marker threads in GC_thr_init, so that they get started even
if no other threads are ever started. (Oddly enough, the parallel
collector worked correctly, though not well, with no helper threads.)
- Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
is set. (Thanks to Alexander Petrossian.)
- GC_PRINT_BACK_HEIGHT would deadlock with thread support.
- Let in_progress_space in backgraph.s grow dynamically.
- Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
- Convert GC_finalizer_mem_freed to bytes in allchblk.c.
- Add missing declaration for GC_generic_malloc_words_small_inner.
Without it, s390x breaks. (Thanks to Ulrich Weigand.)
- Applied several MacOSX patches to support older tool chains.
(Thanks to Stefan Ring.)
- Bug fix for NetBSD/amd64. (Thanks to Marc Recht.) Add NetBSD/sh3
support. (Thanks to Uchiyama Yasushi.)
- Fixed an uninitialized variable in cordprnt.c. (Thanks to gcc for
providing the warning.)
- Eliminated some, but not all, gcc -Wall warnings.
- Changed some old style casts to reinterpret_cast in new_gc_alloc.h.
(Thanks to Dan Grayson.)
- GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
GC_DONT_ADD_BYTE_AT_END is set.
- Changed some (long) casts to (word) in preparation for win64.
(Thanks to Peter Colson.)
- Changed "int stack_size" declaration in pthread_support.c to use
size_t. (Only mattered with GC_ASSERTIONS enabled.)
- Added CRIS (etrax) support. (Thanks to Simon Posnjak and
Hans-Peter Nilsson.)
- Removed GC_IGNORE_FB frame buffer recognition, and replaced
it with a check that the mapping type is MEM_IMAGE.
In theory, this should work much better, but it is a high
risk change for win32. (Thanks to Ashley Bone for the crucial
experimental data behind this, and to Rutger Ovidus for
some further experiments.)
- Fixed print_block_list to print the correct kind number for
STUBBORN. (Thanks to Rutger Ovidus.)
- GC_allochblk_nth incremented GC_words_wasted by bytes rather than
words.
- Consider GC_words_wasted in GC_adj_words_allocd only if it is within
reason. (A hack to avoid some extremely unlikely scenarios in which
we manage to allocate only "wasted" space. 7.0 has a better fix.)
- Changed PowerPC GC_clear implementation to use lwsync instead of
eieio, since the documentation recommends against eieio, and
it seems to be incorrect if the preceding memory op is a load.
- Fixed print_block_list to print the correct kind number for
STUBBORN. (Thanks to Rutger Ovidus.)
- Have configure.in generate an error if it is asked to support
pthreads, but doesn't know how to.
- Added Kazuhiro Inaoka's patch for Renesas M32R support.
- Have the GNU build mechanism link with -ldl. Rename THREADLIBS
to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
- Added Hannes Mehnert's patch for FreeBSD/SPARC support.
- Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
(Thanks tp John Merryweather Cooper.)
- Define MPROTECT_VDB on MACOSX only if threads are being used, since the
dirty page tracking mechanism uses threads. (This avoids an undefined
reference to _GC_darwin_register_mach_handler_thread.)
- By popular demand, use __libc symbols only if we are built with
USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
- Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
The GC itself will dirty lots of pages in this cases, probably making
it counterproductive on all platforms. And the DARWIN port crashes.
Since GC6.4:
- Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
- Make GC_approx_sp() write to dummy location to ensure that stack
is grown here, when sp looks reasonable, rather than later, when
it might look like a bad memory reference. (Problem was never
observed that I know of. But on rereading the code it seemed
dubious.)
- Separate out GC_with_callee_saves_pushed and sometimes call
it from GC_suspend_handler in pthread_stop_world.c. Callee-save
register values sometimes failed to get traced under HP/UX on
PA-RISC. Linux/IA64 had the same problem, though non-stacked
callee-save registers seem to be so rarely used there that nobody
ever noticed.
- Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
from Andreas Tobler, which I had lost.
- Fix compare_and_exchange implementation for gcc/IA64 to deal with
pickier compiler versions.
- Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
compare_and_exchange implementation didn't consider that possibility.
- Undefine GC_pthread_detach in win32_threads.c. (Thanks to
Tagliapietra Tommaso.)
- Fixed inclusion of frame.h for NETBSD in os_dep.c.
- Applied Dan Bonachea's patch to use mmap on AIX.
- Several fixes to resurrect the Irix port on recent OS versions.
- Change ALPHA to use LINUX_STACKBOTTOM.
- Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
bad values of __libc_stack_end on that platform. (Thanks to David Miller.)
- Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
(Unnecessary in 7.0)
- Force a define of __STDC__=0 for the IBM compiler on AIX, so that
we get prototypes. (Unnecessary in 7.0)
- GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
which are only defined in private include files.
- Integrated some small gcconfig.h patches from Dan Bonachea. Also
relaxed assertion about FreeBSD stack size in pthread_support.c.
- Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
support. This may need additional work.
- Avoided potentially infinite recursion in GC_save_callers if
the system backtrace calls malloc. The workaround currently requires
__thread support if this code is used with threads.
- Avoided another similar infinite recursion by conditionally
invoking GC_save_callers in alloc.c. (Thanks to Matthias Andree
for helping to track down both of these.)
- Removed all traces of aix_irix_threads.c. AIX and Irix now use
pthread_support.c and pthread_stop_world.c. The old code appeared
to be unreliable for AIX, and was not regularly maintained.
- On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
they're not always safe to read.
- Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
in GC_remove_from_fl.
- Fix stack_size assertion in GC_pthread_create.
- Fix assertion in GC_steal_mark_stack.
Since 6.5
- Fix CPU count detection for Irix and FreeBSD. (Thanks to Dan Bonachea.)
- Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
- Integrated Andreas Tobler's FreeBSD/PowerPC patch.
- Don't access the GC thread structure from the restart handler. It's
unsafe, since the handler may run too late. (Thanks to Ben Maurer for
tracking this down.)
- Applied Christian Thalinger's patch to change comment syntax in
alpha_mach_dep.S.
- Added test for GC_no_dls in GC_dyld_image_add for DARWIN. (Thanks to
Juan Jose Garcia Ripoli).
- Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM. (Thanks to Sugioka
Toshinobu and Christian Thalinger.)
- Rewrote GC_parse_map_entry. This assumed a fixed column layout of
/proc/self/maps on Linux. This ceased to be true about 2 years ago.
The old code is probably quite problemetic with -DREDIRECT_MALLOC. It
is also used by default for IA64, though I haven't seen actual failures
there.
- More consistently define HBLKSIZE to 4096 on 64 bit architectures with
4K pages. (Thanks to Andrew Haley.)
- With win32 threads, GC_stop_world needs to acquire GC_write_cs. (Thanks
to Ben Hutchings for the observation and patch.)
- Move up struct callinfo declaration to make gcc 4.0.2. happy.
To do:
- The USE_MUNMAP code should really use a separate data structure
indexed by physical page to keep track of time since last use of
-13
View File
@@ -1,16 +1,3 @@
6.5 update:
I disabled incremental GC on Darwin in this version, since I couldn't
get gctest to pass when the GC was built as a dynamic library. Building
with -DMPROTECT_VDB (and threads) on the command line should get you
back to the old state. - HB
./configure --enable-cplusplus results in a "make check" failure, probably
because the ::delete override ends up in a separate dl, and Darwin dynamic
loader semantics appear to be such that this is not really visible to the
main program, unlike on ELF systems. Someone who understands dynamic
loading needs to lookat this. For now, gc_cpp.o needs to be linked
statically, if needed. - HB
Darwin/MacOSX Support - December 16, 2003
=========================================
-1
View File
@@ -115,7 +115,6 @@ GC_IGNORE_FB[=<n>] - (Win32 only.) Try to avoid treating a mapped
are never honored, eliminating this risk for most,
but not all, applications. This feature is likely to disappear
if/when we find a less disgusting "solution".
IN VERSION 6.4 AND LATER, THIS SHOULD BE UNNECESSARY.
The following turn on runtime flags that are also program settable. Checked
only during initialization. We expect that they will usually be set through
+2 -2
View File
@@ -19,10 +19,10 @@ Linux threads. These should not be touched by the client program.
To use threads, you need to abide by the following requirements:
1) You need to use LinuxThreads or NPTL (which are included in libc6).
1) You need to use LinuxThreads (which are included in libc6).
The collector relies on some implementation details of the LinuxThreads
package. This code may not work on other
package. It is unlikely that this code will work on other
pthread implementations (in particular it will *not* work with
MIT pthreads).
+3 -1
View File
@@ -43,7 +43,9 @@ can result in unpleasant heap growth. But it seems better than the
race/deadlock issues we had before.
If solaris_threads are used on an X86 processor with malloc redirected to
GC_malloc a deadlock is likely to result.
GC_malloc, it is necessary to call GC_thr_init explicitly before forking the
first thread. (This avoids a deadlock arising from calling GC_thr_init
with the allocation lock held.)
It appears that there is a problem in using gc_cpp.h in conjunction with
Solaris threads and Sun's C++ runtime. Apparently the overloaded new operator
+31 -48
View File
@@ -96,7 +96,7 @@
/* Newer versions of GNU/Linux define this macro. We
* define it similarly for any ELF systems that don't. */
# ifndef ElfW
# if defined(FREEBSD)
# ifdef FREEBSD
# if __ELF_WORD_SIZE == 32
# define ElfW(type) Elf32_##type
# else
@@ -114,7 +114,7 @@
# define ElfW(type) Elf32_##type
# else
# define ElfW(type) Elf64_##type
# endif
# endif
# endif
# endif
# endif
@@ -493,6 +493,7 @@ static struct link_map *
GC_FirstDLOpenedLinkMap()
{
ElfW(Dyn) *dp;
struct r_debug *r;
static struct link_map *cachedResult = 0;
if( _DYNAMIC == 0) {
@@ -501,12 +502,6 @@ GC_FirstDLOpenedLinkMap()
if( cachedResult == 0 ) {
int tag;
for( dp = _DYNAMIC; (tag = dp->d_tag) != 0; dp++ ) {
/* FIXME: The DT_DEBUG header is not mandated by the */
/* ELF spec. This code appears to be dependent on */
/* idiosynchracies of older GNU tool chains. If this code */
/* fails for you, the real problem is probably that it is */
/* being used at all. You should be getting the */
/* dl_iterate_phdr version. */
if( tag == DT_DEBUG ) {
struct link_map *lm
= ((struct r_debug *)(dp->d_un.d_ptr))->r_map;
@@ -631,8 +626,7 @@ void GC_register_dynamic_libraries()
}
for (i = 0; i < needed_sz; i++) {
flags = addr_map[i].pr_mflags;
if ((flags & (MA_BREAK | MA_STACK | MA_PHYS
| MA_FETCHOP | MA_NOTCACHED)) != 0) goto irrelevant;
if ((flags & (MA_BREAK | MA_STACK | MA_PHYS)) != 0) goto irrelevant;
if ((flags & (MA_READ | MA_WRITE)) != (MA_READ | MA_WRITE))
goto irrelevant;
/* The latter test is empirically useless in very old Irix */
@@ -754,10 +748,6 @@ void GC_register_dynamic_libraries()
# define HAVE_REGISTER_MAIN_STATIC_DATA
/* The frame buffer testing code is dead in this version. */
/* We leave it here temporarily in case the switch to just */
/* testing for MEM_IMAGE sections causes un expected */
/* problems. */
GC_bool GC_warn_fb = TRUE; /* Warn about traced likely */
/* graphics memory. */
GC_bool GC_disallow_ignore_fb = FALSE;
@@ -772,27 +762,25 @@ void GC_register_dynamic_libraries()
/* Should [start, start+len) be treated as a frame buffer */
/* and ignored? */
/* Unfortunately, we currently are not quite sure how to tell */
/* this automatically, and rely largely on user input. */
/* We expect that any mapping with type MEM_MAPPED (which */
/* apparently excludes library data sections) can be safely */
/* ignored. But we're too chicken to do that in this */
/* version. */
/* Unfortunately, we currently have no real way to tell */
/* automatically, and rely largely on user input. */
/* FIXME: If we had more data on this phenomenon (e.g. */
/* is start aligned to a MB multiple?) we should be able to */
/* do better. */
/* Based on a very limited sample, it appears that: */
/* - Frame buffer mappings appear as mappings of large */
/* length, usually a bit less than a power of two. */
/* - The definition of "a bit less" in the above cannot */
/* be made more precise. */
/* - Have a starting address at best 64K aligned. */
/* - Have type == MEM_MAPPED. */
static GC_bool is_frame_buffer(ptr_t start, size_t len, DWORD tp)
/* - Frame buffer mappings appear as mappings of length */
/* 2**n MB - 192K. (We guess the 192K can vary a bit.) */
/* - Have a stating address at best 64K aligned. */
/* I'd love more information about the mapping, since I */
/* can't reproduce the problem. */
static GC_bool is_frame_buffer(ptr_t start, size_t len)
{
static GC_bool initialized = FALSE;
# define MB (1024*1024)
# define DEFAULT_FB_MB 15
# define MIN_FB_MB 3
if (GC_disallow_ignore_fb || tp != MEM_MAPPED) return FALSE;
if (GC_disallow_ignore_fb) return FALSE;
if (!initialized) {
char * ignore_fb_string = GETENV("GC_IGNORE_FB");
@@ -881,11 +869,7 @@ void GC_register_dynamic_libraries()
&& (protect == PAGE_EXECUTE_READWRITE
|| protect == PAGE_READWRITE)
&& !GC_is_heap_base(buf.AllocationBase)
/* This used to check for
* !is_frame_buffer(p, buf.RegionSize, buf.Type)
* instead of just checking for MEM_IMAGE.
* If something breaks, change it back. */
&& buf.Type == MEM_IMAGE) {
&& !is_frame_buffer(p, buf.RegionSize)) {
# ifdef DEBUG_VIRTUALQUERY
GC_dump_meminfo(&buf);
# endif
@@ -1141,22 +1125,21 @@ static const char *GC_dyld_name_for_hdr(struct mach_header *hdr) {
static void GC_dyld_image_add(struct mach_header* hdr, unsigned long slide) {
unsigned long start,end,i;
const struct section *sec;
if (GC_no_dls) return;
for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
sec = getsectbynamefromheader(
hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
if(sec == NULL || sec->size == 0) continue;
start = slide + sec->addr;
end = start + sec->size;
# ifdef DARWIN_DEBUG
GC_printf4("Adding section at %p-%p (%lu bytes) from image %s\n",
if(sec == NULL || sec->size == 0) continue;
start = slide + sec->addr;
end = start + sec->size;
# ifdef DARWIN_DEBUG
GC_printf4("Adding section at %p-%p (%lu bytes) from image %s\n",
start,end,sec->size,GC_dyld_name_for_hdr(hdr));
# endif
# endif
GC_add_roots((char*)start,(char*)end);
}
# ifdef DARWIN_DEBUG
GC_print_static_roots();
# endif
}
# ifdef DARWIN_DEBUG
GC_print_static_roots();
# endif
}
/* This should never be called by a thread holding the lock */
@@ -1169,15 +1152,15 @@ static void GC_dyld_image_remove(struct mach_header* hdr, unsigned long slide) {
if(sec == NULL || sec->size == 0) continue;
start = slide + sec->addr;
end = start + sec->size;
# ifdef DARWIN_DEBUG
# ifdef DARWIN_DEBUG
GC_printf4("Removing section at %p-%p (%lu bytes) from image %s\n",
start,end,sec->size,GC_dyld_name_for_hdr(hdr));
# endif
GC_remove_roots((char*)start,(char*)end);
}
# ifdef DARWIN_DEBUG
GC_print_static_roots();
# endif
# ifdef DARWIN_DEBUG
GC_print_static_roots();
# endif
}
void GC_register_dynamic_libraries() {
+16 -17
View File
@@ -807,21 +807,24 @@ void (* GC_finalizer_notifier)() = (void (*) GC_PROTO((void)))0;
static GC_word last_finalizer_notification = 0;
#ifdef KEEP_BACK_PTRS
void GC_generate_random_backtrace_no_gc(void);
#endif
void GC_notify_or_invoke_finalizers GC_PROTO((void))
{
/* This is a convenient place to generate backtraces if appropriate, */
/* since that code is not callable with the allocation lock. */
# if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH)
static word last_back_trace_gc_no = 1; /* Skip first one. */
# ifdef KEEP_BACK_PTRS
if (GC_backtraces > 0) {
static word last_back_trace_gc_no = 3; /* Skip early ones. */
long i;
if (GC_gc_no > last_back_trace_gc_no) {
word i;
# ifdef KEEP_BACK_PTRS
LOCK();
LOCK();
if (GC_gc_no > last_back_trace_gc_no) {
/* Stops when GC_gc_no wraps; that's OK. */
last_back_trace_gc_no = (word)(-1); /* disable others. */
for (i = 0; i < GC_backtraces; ++i) {
last_back_trace_gc_no = (word)(-1); /* disable others. */
for (i = 0; i < GC_backtraces; ++i) {
/* FIXME: This tolerates concurrent heap mutation, */
/* which may cause occasional mysterious results. */
/* We need to release the GC lock, since GC_print_callers */
@@ -829,14 +832,10 @@ void GC_notify_or_invoke_finalizers GC_PROTO((void))
UNLOCK();
GC_generate_random_backtrace_no_gc();
LOCK();
}
last_back_trace_gc_no = GC_gc_no;
UNLOCK();
# endif
# ifdef MAKE_BACK_GRAPH
if (GC_print_back_height)
GC_print_back_graph_stats();
# endif
}
last_back_trace_gc_no = GC_gc_no;
}
UNLOCK();
}
# endif
if (GC_finalize_now == 0) return;
+1 -1
View File
@@ -206,7 +206,7 @@ register struct hblk * h;
{
hdr * result;
if (!get_index((word) h)) return(0);
if (!get_index((word) h)) return(FALSE);
result = alloc_hdr();
SET_HDR(h, result);
# ifdef USE_MUNMAP
+7 -30
View File
@@ -32,7 +32,7 @@
# include "gc_config_macros.h"
# if defined(__STDC__) || defined(__cplusplus) || defined(_AIX)
# if defined(__STDC__) || defined(__cplusplus)
# define GC_PROTO(args) args
typedef void * GC_PTR;
# define GC_CONST const
@@ -207,7 +207,7 @@ GC_API GC_word GC_free_space_divisor;
/* least N/GC_free_space_divisor bytes between */
/* collections, where N is the heap size plus */
/* a rough estimate of the root set size. */
/* Initially, GC_free_space_divisor = 3. */
/* Initially, GC_free_space_divisor = 4. */
/* Increasing its value will use less space */
/* but more collection time. Decreasing it */
/* will appreciably decrease collection time */
@@ -324,9 +324,6 @@ GC_API void GC_end_stubborn_change GC_PROTO((GC_PTR));
/* the base of the user object. */
/* Return 0 if displaced_pointer doesn't point to within a valid */
/* object. */
/* Note that a deallocated object in the garbage collected heap */
/* may be considered valid, even if it has been deallocated with */
/* GC_free. */
GC_API GC_PTR GC_base GC_PROTO((GC_PTR displaced_pointer));
/* Given a pointer to the base of an object, return its size in bytes. */
@@ -867,7 +864,7 @@ GC_API int GC_thread_is_registered GC_PROTO((void));
/* Safer assignment of a pointer to a nonstack location. */
#ifdef GC_DEBUG
# if defined(__STDC__) || defined(_AIX)
# ifdef __STDC__
# define GC_PTR_STORE(p, q) \
(*(void **)GC_is_visible(p) = GC_is_valid_displacement(q))
# else
@@ -894,7 +891,7 @@ GC_API void (*GC_is_visible_print_proc)
/* thread library calls. We do that here by macro defining them. */
#if !defined(GC_USE_LD_WRAP) && \
(defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS))
(defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS))
#if defined(_IN_LIBGC) || defined(USE_INCLUDED_LIBGC)
# include "gc_pthread_redirects.h"
#else
@@ -958,7 +955,7 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
* no-op and the collector self-initializes. But a number of platforms
* make that too hard.
*/
#if (defined(sparc) || defined(__sparc)) && defined(sun)
#if defined(sparc) || defined(__sparc)
/*
* If you are planning on putting
* the collector in a SunOS 5 dynamic library, you need to call GC_INIT()
@@ -968,32 +965,12 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
# define GC_INIT() { extern end, etext; \
GC_noop(&end, &etext); }
#else
# if defined(__CYGWIN32__) || defined (_AIX)
# if defined(__CYGWIN32__) && defined(GC_DLL) || defined (_AIX)
/*
* Similarly gnu-win32 DLLs need explicit initialization from
* the main program, as does AIX.
*/
# ifdef __CYGWIN32__
extern int _data_start__[];
extern int _data_end__[];
extern int _bss_start__[];
extern int _bss_end__[];
# define GC_MAX(x,y) ((x) > (y) ? (x) : (y))
# define GC_MIN(x,y) ((x) < (y) ? (x) : (y))
# define GC_DATASTART ((GC_PTR) GC_MIN(_data_start__, _bss_start__))
# define GC_DATAEND ((GC_PTR) GC_MAX(_data_end__, _bss_end__))
# ifdef GC_DLL
# define GC_INIT() { GC_add_roots(GC_DATASTART, GC_DATAEND); }
# else
# define GC_INIT()
# endif
# endif
# if defined(_AIX)
extern int _data[], _end[];
# define GC_DATASTART ((GC_PTR)((ulong)_data))
# define GC_DATAEND ((GC_PTR)((ulong)_end))
# define GC_INIT() { GC_add_roots(GC_DATASTART, GC_DATAEND); }
# endif
# define GC_INIT() { GC_add_roots(DATASTART, DATAEND); }
# else
# if defined(__APPLE__) && defined(__MACH__) || defined(GC_WIN32_THREADS)
# define GC_INIT() { GC_init(); }
+3 -9
View File
@@ -39,13 +39,7 @@
#define GC_ALLOCATOR_H
#include "gc.h"
#if defined(__GNUC__)
# define GC_ATTR_UNUSED __attribute__((unused))
#else
# define GC_ATTR_UNUSED
#endif
#include "gc.h" // For size_t
/* First some helpers to allow us to dispatch on whether or not a type
* is known to be pointerfree.
@@ -128,7 +122,7 @@ public:
}
// __p is not permitted to be a null pointer.
void deallocate(pointer __p, size_type GC_ATTR_UNUSED GC_n)
void deallocate(pointer __p, size_type GC_n)
{ GC_FREE(__p); }
size_type max_size() const throw()
@@ -204,7 +198,7 @@ public:
}
// __p is not permitted to be a null pointer.
void deallocate(pointer __p, size_type GC_ATTR_UNUSED GC_n)
void deallocate(pointer __p, size_type GC_n)
{ GC_FREE(__p); }
size_type max_size() const throw()
-4
View File
@@ -95,10 +95,6 @@
# define GC_DGUX386_THREADS
# define GC_PTHREADS
# endif
# if defined(_AIX)
# define GC_AIX_THREADS
# define GC_PTHREADS
# endif
#endif /* GC_THREADS */
#if defined(GC_THREADS) && !defined(GC_PTHREADS) && \
+1 -1
View File
@@ -74,7 +74,7 @@ cycle, then that's considered a storage leak, and neither will be
collectable. See the interface gc.h for low-level facilities for
handling such cycles of objects with clean-up.
The collector cannot guarantee that it will find all inaccessible
The collector cannot guarrantee that it will find all inaccessible
objects. In practice, it finds almost all of them.
+1 -1
View File
@@ -46,7 +46,7 @@
#endif /* SOLARIS_THREADS || SOLARIS_PTHREADS */
#if !defined(GC_USE_LD_WRAP) && (defined(GC_PTHREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS)) && !defined(GC_SOLARIS_PTHREADS)
#if !defined(GC_USE_LD_WRAP) && defined(GC_PTHREADS) && !defined(GC_SOLARIS_PTHREADS)
/* We treat these similarly. */
# include <pthread.h>
# include <signal.h>
+4 -4
View File
@@ -109,7 +109,7 @@ enum { GC_byte_alignment = 8 };
enum { GC_word_alignment = GC_byte_alignment/GC_bytes_per_word };
inline void * &GC_obj_link(void * p)
{ return *reinterpret_cast<void **>(p); }
{ return *(void **)p; }
// Compute a number of words >= n+1 bytes.
// The +1 allows for pointers one past the end.
@@ -228,7 +228,7 @@ class single_client_gc_alloc_template {
} else {
flh = GC_objfreelist_ptr + nwords;
GC_obj_link(p) = *flh;
memset(reinterpret_cast<char *>(p) + GC_bytes_per_word, 0,
memset((char *)p + GC_bytes_per_word, 0,
GC_bytes_per_word * (nwords - 1));
*flh = p;
GC_aux::GC_mem_recently_freed += nwords;
@@ -352,9 +352,9 @@ class simple_alloc<T, alloc> { \
public: \
static T *allocate(size_t n) \
{ return 0 == n? 0 : \
reinterpret_cast<T*>(alloc::ptr_free_allocate(n * sizeof (T))); } \
(T*) alloc::ptr_free_allocate(n * sizeof (T)); } \
static T *allocate(void) \
{ return reinterpret_cast<T*>(alloc::ptr_free_allocate(sizeof (T))); } \
{ return (T*) alloc::ptr_free_allocate(sizeof (T)); } \
static void deallocate(T *p, size_t n) \
{ if (0 != n) alloc::ptr_free_deallocate(p, n * sizeof (T)); } \
static void deallocate(T *p) \
+1 -1
View File
@@ -108,7 +108,7 @@ extern hdr * GC_invalid_header; /* header for an imaginary block */
/* Analogous to GET_HDR, except that in the case of large objects, it */
/* Returns the header for the object beginning, and updates p. */
/* Returns GC_invalid_header instead of 0. All of this saves a branch */
/* Returns &GC_bad_header instead of 0. All of this saves a branch */
/* in the fast path. */
# define HC_GET_HDR(p, hhdr, source) \
{ \
+37 -89
View File
@@ -155,25 +155,6 @@
# define GC_TEST_AND_SET_DEFINED
# endif
# if defined(POWERPC)
# if CPP_WORDSZ == 64
inline static int GC_test_and_set(volatile unsigned int *addr) {
unsigned long oldval;
unsigned long temp = 1; /* locked value */
__asm__ __volatile__(
"1:\tldarx %0,0,%3\n" /* load and reserve */
"\tcmpdi %0, 0\n" /* if load is */
"\tbne 2f\n" /* non-zero, return already set */
"\tstdcx. %2,0,%1\n" /* else store conditional */
"\tbne- 1b\n" /* retry if lost reservation */
"\tsync\n" /* import barrier */
"2:\t\n" /* oldval is zero if we set */
: "=&r"(oldval), "=p"(addr)
: "r"(temp), "1"(addr)
: "cr0","memory");
return (int)oldval;
}
# else
inline static int GC_test_and_set(volatile unsigned int *addr) {
int oldval;
int temp = 1; /* locked value */
@@ -191,13 +172,12 @@
: "cr0","memory");
return oldval;
}
# endif
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
__asm__ __volatile__("lwsync" : : : "memory");
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
__asm__ __volatile__("eieio" : : : "memory");
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
# endif
# if defined(ALPHA)
inline static int GC_test_and_set(volatile unsigned int * addr)
@@ -251,30 +231,6 @@
}
# define GC_TEST_AND_SET_DEFINED
# endif /* ARM32 */
# ifdef CRIS
inline static int GC_test_and_set(volatile unsigned int *addr) {
/* Ripped from linuxthreads/sysdeps/cris/pt-machine.h. */
/* Included with Hans-Peter Nilsson's permission. */
register unsigned long int ret;
/* Note the use of a dummy output of *addr to expose the write.
* The memory barrier is to stop *other* writes being moved past
* this code.
*/
__asm__ __volatile__("clearf\n"
"0:\n\t"
"movu.b [%2],%0\n\t"
"ax\n\t"
"move.b %3,[%2]\n\t"
"bwf 0b\n\t"
"clearf"
: "=&r" (ret), "=m" (*addr)
: "r" (addr), "r" ((int) 1), "m" (*addr)
: "memory");
return ret;
}
# define GC_TEST_AND_SET_DEFINED
# endif /* CRIS */
# ifdef S390
inline static int GC_test_and_set(volatile unsigned int *addr) {
int ret;
@@ -318,8 +274,6 @@
# define GC_test_and_set(addr) test_and_set((void *)addr,1)
# endif
# else
# include <sgidefs.h>
# include <mutex.h>
# define GC_test_and_set(addr) __test_and_set32((void *)addr,1)
# define GC_clear(addr) __lock_release(addr);
# define GC_CLEAR_DEFINED
@@ -392,7 +346,7 @@
# endif
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS)
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
# define NO_THREAD (pthread_t)(-1)
# include <pthread.h>
# if defined(PARALLEL_MARK)
@@ -439,29 +393,6 @@
# if defined(POWERPC)
# if !defined(GENERIC_COMPARE_AND_SWAP)
# if CPP_WORDSZ == 64
/* Returns TRUE if the comparison succeeded. */
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
GC_word old, GC_word new_val)
{
unsigned long result, dummy;
__asm__ __volatile__(
"1:\tldarx %0,0,%5\n"
"\tcmpd %0,%4\n"
"\tbne 2f\n"
"\tstdcx. %3,0,%2\n"
"\tbne- 1b\n"
"\tsync\n"
"\tli %1, 1\n"
"\tb 3f\n"
"2:\tli %1, 0\n"
"3:\t\n"
: "=&r" (dummy), "=r" (result), "=p" (addr)
: "r" (new_val), "r" (old), "2"(addr)
: "cr0","memory");
return (GC_bool) result;
}
# else
/* Returns TRUE if the comparison succeeded. */
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
GC_word old, GC_word new_val)
@@ -483,7 +414,6 @@
: "cr0","memory");
return (GC_bool) result;
}
# endif
# endif /* !GENERIC_COMPARE_AND_SWAP */
inline static void GC_memory_barrier()
{
@@ -497,18 +427,9 @@
GC_word old, GC_word new_val)
{
unsigned long oldval;
# if CPP_WORDSZ == 32
__asm__ __volatile__(
"addp4 %0=0,%1\n"
"mov ar.ccv=%3 ;; cmpxchg4.rel %0=[%0],%2,ar.ccv"
: "=&r"(oldval)
: "r"(addr), "r"(new_val), "r"(old) : "memory");
# else
__asm__ __volatile__(
"mov ar.ccv=%3 ;; cmpxchg8.rel %0=[%1],%2,ar.ccv"
: "=r"(oldval)
: "r"(addr), "r"(new_val), "r"(old) : "memory");
# endif
__asm__ __volatile__("mov ar.ccv=%4 ;; cmpxchg8.rel %0=%1,%2,ar.ccv"
: "=r"(oldval), "=m"(*addr)
: "r"(new_val), "1"(*addr), "r"(old) : "memory");
return (oldval == old);
}
# endif /* !GENERIC_COMPARE_AND_SWAP */
@@ -672,6 +593,33 @@
extern pthread_t GC_mark_lock_holder;
# endif
# endif /* GC_PTHREADS with linux_threads.c implementation */
# if defined(GC_IRIX_THREADS)
# include <pthread.h>
/* This probably should never be included, but I can't test */
/* on Irix anymore. */
# include <mutex.h>
extern volatile unsigned int GC_allocate_lock;
/* This is not a mutex because mutexes that obey the (optional) */
/* POSIX scheduling rules are subject to convoys in high contention */
/* applications. This is basically a spin lock. */
extern pthread_t GC_lock_holder;
extern void GC_lock(void);
/* Allocation lock holder. Only set if acquired by client through */
/* GC_call_with_alloc_lock. */
# define SET_LOCK_HOLDER() GC_lock_holder = pthread_self()
# define NO_THREAD (pthread_t)(-1)
# define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
# define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self()))
# define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); }
# define UNLOCK() GC_clear(&GC_allocate_lock);
extern VOLATILE GC_bool GC_collecting;
# define ENTER_GC() \
{ \
GC_collecting = 1; \
}
# define EXIT_GC() GC_collecting = 0;
# endif /* GC_IRIX_THREADS */
# if defined(GC_WIN32_THREADS)
# if defined(GC_PTHREADS)
# include <pthread.h>
+14 -24
View File
@@ -259,6 +259,17 @@ typedef char * ptr_t; /* A generic pointer to which we can add */
/* */
/*********************************/
#ifdef SAVE_CALL_CHAIN
/* Fill in the pc and argument information for up to NFRAMES of my */
/* callers. Ignore my frame and my callers frame. */
struct callinfo;
void GC_save_callers GC_PROTO((struct callinfo info[NFRAMES]));
void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
#endif
#ifdef NEED_CALLINFO
struct callinfo {
word ci_pc; /* Caller, not callee, pc */
@@ -272,16 +283,6 @@ typedef char * ptr_t; /* A generic pointer to which we can add */
};
#endif
#ifdef SAVE_CALL_CHAIN
/* Fill in the pc and argument information for up to NFRAMES of my */
/* callers. Ignore my frame and my callers frame. */
void GC_save_callers GC_PROTO((struct callinfo info[NFRAMES]));
void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
#endif
/*********************************/
/* */
@@ -550,7 +551,7 @@ extern GC_warn_proc GC_current_warn_proc;
#define CPP_MAXOBJBYTES (CPP_HBLKSIZE/2)
#define MAXOBJBYTES ((word)CPP_MAXOBJBYTES)
#define CPP_MAXOBJSZ BYTES_TO_WORDS(CPP_MAXOBJBYTES)
#define CPP_MAXOBJSZ BYTES_TO_WORDS(CPP_HBLKSIZE/2)
#define MAXOBJSZ ((word)CPP_MAXOBJSZ)
# define divHBLKSZ(n) ((n) >> LOG_HBLKSIZE)
@@ -938,11 +939,11 @@ struct _GC_arrays {
char _valid_offsets[VALID_OFFSET_SZ];
/* GC_valid_offsets[i] == TRUE ==> i */
/* is registered as a displacement. */
# define OFFSET_VALID(displ) \
(GC_all_interior_pointers || GC_valid_offsets[displ])
char _modws_valid_offsets[sizeof(word)];
/* GC_valid_offsets[i] ==> */
/* GC_modws_valid_offsets[i%sizeof(word)] */
# define OFFSET_VALID(displ) \
(GC_all_interior_pointers || GC_valid_offsets[displ])
# ifdef STUBBORN_ALLOC
page_hash_table _changed_pages;
/* Stubborn object pages that were changes since last call to */
@@ -1632,10 +1633,6 @@ ptr_t GC_generic_malloc_ignore_off_page GC_PROTO((size_t b, int k));
/* are ignored. */
ptr_t GC_generic_malloc_inner GC_PROTO((word lb, int k));
/* Ditto, but I already hold lock, etc. */
ptr_t GC_generic_malloc_words_small_inner GC_PROTO((word lw, int k));
/* Analogous to the above, but assumes */
/* a small object size, and bypasses */
/* MERGE_SIZES mechanism. */
ptr_t GC_generic_malloc_words_small GC_PROTO((size_t lw, int k));
/* As above, but size in units of words */
/* Bypasses MERGE_SIZES. Assumes */
@@ -1729,13 +1726,6 @@ extern GC_bool GC_print_stats; /* Produce at least some logging output */
#ifdef KEEP_BACK_PTRS
extern long GC_backtraces;
void GC_generate_random_backtrace_no_gc(void);
#endif
extern GC_bool GC_print_back_height;
#ifdef MAKE_BACK_GRAPH
void GC_print_back_graph_stats(void);
#endif
/* Macros used for collector internal allocation. */
+70 -204
View File
@@ -55,7 +55,7 @@
# endif
/* And one for FreeBSD: */
# if defined(__FreeBSD__) && !defined(FREEBSD)
# if defined(__FreeBSD__)
# define FREEBSD
# endif
@@ -97,10 +97,6 @@
# define ARM32
# define mach_type_known
# endif
# if defined(NETBSD) && defined(__sh__)
# define SH
# define mach_type_known
# endif
# if defined(vax)
# define VAX
# ifdef ultrix
@@ -119,8 +115,8 @@
# if defined(nec_ews) || defined(_nec_ews)
# define EWS4800
# endif
# if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD)
# if defined(ultrix) || defined(__ultrix)
# if !defined(LINUX) && !defined(EWS4800)
# if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__)
# define ULTRIX
# else
# if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) \
@@ -174,7 +170,7 @@
# define mach_type_known
# endif
# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
&& !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
&& !defined(__OpenBSD__) && !(__NetBSD__)
# define SPARC
# define DRSNX
# define mach_type_known
@@ -205,16 +201,14 @@
# if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
|| defined(hppa) || defined(__hppa__)
# define HP_PA
# if !defined(LINUX) && !defined(HPUX)
# ifndef LINUX
# define HPUX
# endif
# define mach_type_known
# endif
# if defined(__ia64) && defined(_HPUX_SOURCE)
# define IA64
# ifndef HPUX
# define HPUX
# endif
# define HPUX
# define mach_type_known
# endif
# if defined(__BEOS__) && defined(_X86_)
@@ -238,18 +232,7 @@
# define ARM32
# define mach_type_known
# endif
# if defined(LINUX) && defined(__cris__)
# ifndef CRIS
# define CRIS
# endif
# define mach_type_known
# endif
# if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || \
defined(powerpc64) || defined(__powerpc64__))
# define POWERPC
# define mach_type_known
# endif
# if defined(FREEBSD) && (defined(powerpc) || defined(__powerpc__))
# if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || defined(powerpc64) || defined(__powerpc64__))
# define POWERPC
# define mach_type_known
# endif
@@ -269,10 +252,6 @@
# define SH
# define mach_type_known
# endif
# if defined(LINUX) && defined(__m32r__)
# define M32R
# define mach_type_known
# endif
# if defined(__alpha) || defined(__alpha__)
# define ALPHA
# if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) && !defined(FREEBSD)
@@ -297,36 +276,16 @@
# define MACOS
# define mach_type_known
# endif
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
# define DARWIN
# if defined(__ppc__) || defined(__ppc64__)
# if defined(macosx) || \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
# define DARWIN
# define POWERPC
# define mach_type_known
# elif defined(__i386__)
# endif
# if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
# define DARWIN
# define I386
# define mach_type_known
# define DARWIN_DONT_PARSE_STACK
# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
# define DATAEND ((ptr_t) get_end())
# define STACKBOTTOM ((ptr_t) 0xc0000000)
# define USE_MMAP
# define USE_MMAP_ANON
# define USE_ASM_PUSH_REGS
/* This is potentially buggy. It needs more testing. See the comments in
os_dep.c. It relies on threads to track writes. */
# ifdef GC_DARWIN_THREADS
/* # define MPROTECT_VDB -- diabled for now. May work for some apps. */
# endif
# include <unistd.h>
# define GETPAGESIZE() getpagesize()
/* There seems to be some issues with trylock hanging on darwin. This
should be looked into some more */
# define NO_PTHREAD_TRYLOCK
# endif
--> Not really supported, but at least we recognize it.
# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
@@ -355,10 +314,6 @@
# define X86_64
# define mach_type_known
# endif
# if defined(FREEBSD) && defined(__sparc__)
# define SPARC
# define mach_type_known
#endif
# if defined(bsdi) && (defined(i386) || defined(__i386__))
# define I386
# define BSDI
@@ -519,22 +474,17 @@
/* POWERPC ==> IBM/Apple PowerPC */
/* (MACOS(<=9),DARWIN(incl.MACOSX),*/
/* LINUX, NETBSD, NOSYS variants) */
/* Handles 32 and 64-bit variants. */
/* AIX should be handled here, but */
/* that's called an RS6000. */
/* CRIS ==> Axis Etrax */
/* M32R ==> Renesas M32R */
/*
* For each architecture and OS, the following need to be defined:
*
* CPP_WORDSZ is a simple integer constant representing the word size.
* CPP_WORD_SZ is a simple integer constant representing the word size.
* in bits. We assume byte addressibility, where a byte has 8 bits.
* We also assume CPP_WORDSZ is either 32 or 64.
* We also assume CPP_WORD_SZ is either 32 or 64.
* (We care about the length of pointers, not hardware
* bus widths. Thus a 64 bit processor with a C compiler that uses
* 32 bit pointers should use CPP_WORDSZ of 32, not 64. Default is 32.)
* 32 bit pointers should use CPP_WORD_SZ of 32, not 64. Default is 32.)
*
* MACH_TYPE is a string representation of the machine type.
* OS_TYPE is analogous for the OS.
@@ -555,9 +505,6 @@
* DATAEND, if not `end' where `end' is defined as ``extern int end[];''.
* RTH suggests gaining access to linker script synth'd values with
* this idiom instead of `&end' where `end' is defined as ``extern int end;'' .
* Otherwise, ``GCC will assume these are in .sdata/.sbss'' and it will, e.g.,
* cause failures on alpha*-*-* with ``-msmall-data or -fpic'' or mips-*-*
* without any special options.
*
* ALIGN_DOUBLE of GC_malloc should return blocks aligned to twice
* the pointer size.
@@ -651,8 +598,7 @@
*/
# if defined(__GNUC__) && ((__GNUC__ >= 3) || \
(__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) \
&& !defined(__INTEL_COMPILER) \
&& !defined(__PATHCC__)
&& !defined(__INTEL_COMPILER)
# define HAVE_BUILTIN_UNWIND_INIT
# endif
@@ -776,7 +722,7 @@
# endif
# endif
# if defined(POWERPC)
# ifdef POWERPC
# define MACH_TYPE "POWERPC"
# ifdef MACOS
# define ALIGNMENT 2 /* Still necessary? Could it be 4? */
@@ -789,14 +735,12 @@
# define DATAEND /* not needed */
# endif
# ifdef LINUX
# if defined(__powerpc64__)
# if (defined (powerpc64) || defined(__powerpc64__))
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# ifndef HBLKSIZE
# define HBLKSIZE 4096
# endif
# else
# define ALIGNMENT 4
# define ALIGNMENT 4 /* Guess. Can someone verify? */
/* This was 2, but that didn't sound right. */
# endif
# define OS_TYPE "LINUX"
/* HEURISTIC1 has been reliably reported to fail for a 32-bit */
@@ -808,12 +752,7 @@
# define DATAEND (_end)
# endif
# ifdef DARWIN
# ifdef __ppc64__
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
# define ALIGNMENT 4
# endif
# define ALIGNMENT 4
# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
@@ -825,10 +764,8 @@
# define USE_MMAP_ANON
# define USE_ASM_PUSH_REGS
/* This is potentially buggy. It needs more testing. See the comments in
os_dep.c. It relies on threads to track writes. */
# ifdef GC_DARWIN_THREADS
/* # define MPROTECT_VDB -- diabled for now. May work for some apps. */
# endif
os_dep.c */
# define MPROTECT_VDB
# include <unistd.h>
# define GETPAGESIZE() getpagesize()
# if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
@@ -842,22 +779,6 @@
should be looked into some more */
# define NO_PTHREAD_TRYLOCK
# endif
# ifdef FREEBSD
# define ALIGNMENT 4
# define OS_TYPE "FREEBSD"
# ifndef GC_FREEBSD_THREADS
# define MPROTECT_VDB
# endif
# define SIG_SUSPEND SIGUSR1
# define SIG_THR_RESTART SIGUSR2
# define FREEBSD_STACKBOTTOM
# ifdef __ELF__
# define DYNAMIC_LOADING
# endif
extern char etext[];
extern char * GC_FreeBSDGetDataStart();
# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
# endif
# ifdef NETBSD
# define ALIGNMENT 4
# define OS_TYPE "NETBSD"
@@ -913,10 +834,6 @@
# define CPP_WORDSZ 32
# endif
# define ALIGN_DOUBLE
# ifdef _FILE_OFFSET_BITS
# undef _FILE_OFFSET_BITS /* libelf.h & procfs.h doesn't compile with large file support */
# define _FILE_OFFSET_BITS 32
# endif
# ifdef SUNOS5
# define OS_TYPE "SUNOS5"
extern int _etext[];
@@ -989,26 +906,20 @@
# define DYNAMIC_LOADING
# else
Linux Sparc/a.out not supported
# endif
# define SVR4
# include <features.h>
# if defined(__GLIBC__) && __GLIBC__ >= 2
# define SEARCH_FOR_DATA_START
# else
extern char **__environ;
# define DATASTART ((ptr_t)(&__environ))
/* hideous kludge: __environ is the first */
/* word in crt0.o, and delimits the start */
/* of the data segment, no matter which */
/* ld options were passed through. */
/* We could use _etext instead, but that */
/* would include .rodata, which may */
/* contain large read-only data tables */
/* that we'd rather not scan. */
# endif
extern int _end[];
extern int _etext[];
# define DATAEND (_end)
# define LINUX_STACKBOTTOM
# define SVR4
extern ptr_t GC_SysVGetDataStart();
# ifdef __arch64__
# define DATASTART GC_SysVGetDataStart(0x100000, _etext)
/* libc_stack_end is not set reliably for sparc64 */
# define STACKBOTTOM ((ptr_t) 0x80000000000ULL)
# else
# define DATASTART GC_SysVGetDataStart(0x10000, _etext)
# define LINUX_STACKBOTTOM
# endif
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
@@ -1027,23 +938,6 @@
# define DATASTART ((ptr_t)(etext))
# endif
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
# define SIG_SUSPEND SIGUSR1
# define SIG_THR_RESTART SIGUSR2
# define FREEBSD_STACKBOTTOM
# ifdef __ELF__
# define DYNAMIC_LOADING
# endif
extern char etext[];
extern char edata[];
extern char end[];
# define NEED_FIND_LIMIT
# define DATASTART ((ptr_t)(&etext))
# define DATAEND (GC_find_limit (DATASTART, TRUE))
# define DATASTART2 ((ptr_t)(&edata))
# define DATAEND2 ((ptr_t)(&end))
# endif
# endif
# ifdef I386
@@ -1228,8 +1122,26 @@
# endif
# ifdef CYGWIN32
# define OS_TYPE "CYGWIN32"
# define DATASTART ((ptr_t)GC_DATASTART) /* From gc.h */
# define DATAEND ((ptr_t)GC_DATAEND)
extern int _data_start__[];
extern int _data_end__[];
extern int _bss_start__[];
extern int _bss_end__[];
/* For binutils 2.9.1, we have */
/* DATASTART = _data_start__ */
/* DATAEND = _bss_end__ */
/* whereas for some earlier versions it was */
/* DATASTART = _bss_start__ */
/* DATAEND = _data_end__ */
/* To get it right for both, we take the */
/* minumum/maximum of the two. */
# ifndef MAX
# define MAX(x,y) ((x) > (y) ? (x) : (y))
# endif
# ifndef MIN
# define MIN(x,y) ((x) < (y) ? (x) : (y))
# endif
# define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))
# define DATAEND ((ptr_t) MAX(_data_end__, _bss_end__))
# undef STACK_GRAN
# define STACK_GRAN 0x10000
# define HEURISTIC1
@@ -1440,6 +1352,8 @@
# define DATAEND /* not needed */
# endif
# if defined(NETBSD)
/* This also checked for __MIPSEL__ . Why? NETBSD recognition */
/* should be handled at the top of the file. */
# define ALIGNMENT 4
# define OS_TYPE "NETBSD"
# define HEURISTIC2
@@ -1473,8 +1387,6 @@
# define CPP_WORDSZ 32
# define STACKBOTTOM ((ptr_t)((ulong)&errno))
# endif
# define USE_MMAP
# define USE_MMAP_ANON
/* From AIX linker man page:
_text Specifies the first location of the program.
_etext Specifies the first location after the program.
@@ -1631,7 +1543,7 @@
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define LINUX_STACKBOTTOM
# define STACKBOTTOM ((ptr_t) 0x120000000)
# ifdef __ELF__
# define SEARCH_FOR_DATA_START
# define DYNAMIC_LOADING
@@ -1782,7 +1694,7 @@
# define USE_GENERIC_PUSH_REGS
# ifdef UTS4
# define OS_TYPE "UTS4"
extern int etext[];
extern int etext[];
extern int _etext[];
extern int _end[];
extern ptr_t GC_SysVGetDataStart();
@@ -1796,20 +1708,18 @@
# define MACH_TYPE "S390"
# define USE_GENERIC_PUSH_REGS
# ifndef __s390x__
# define ALIGNMENT 4
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# define CPP_WORDSZ 32
# else
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# endif
# ifndef HBLKSIZE
# define HBLKSIZE 4096
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# define HBLKSIZE 4096
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define LINUX_STACKBOTTOM
# define DYNAMIC_LOADING
extern int __data_start[];
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern int _end[];
# define DATAEND (_end)
@@ -1886,19 +1796,6 @@
# endif
#endif
# ifdef CRIS
# define MACH_TYPE "CRIS"
# define CPP_WORDSZ 32
# define ALIGNMENT 1
# define OS_TYPE "LINUX"
# define DYNAMIC_LOADING
# define LINUX_STACKBOTTOM
# define USE_GENERIC_PUSH_REGS
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
# endif
# ifdef SH
# define MACH_TYPE "SH"
# define ALIGNMENT 4
@@ -1908,20 +1805,13 @@
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define LINUX_STACKBOTTOM
# define STACKBOTTOM ((ptr_t) 0x7c000000)
# define USE_GENERIC_PUSH_REGS
# define DYNAMIC_LOADING
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"
# define HEURISTIC2
# define DATASTART GC_data_start
# define USE_GENERIC_PUSH_REGS
# define DYNAMIC_LOADING
# endif
# endif
# ifdef SH4
@@ -1931,23 +1821,6 @@
# define DATAEND /* not needed */
# endif
# ifdef M32R
# define CPP_WORDSZ 32
# define MACH_TYPE "M32R"
# define ALIGNMENT 4
# ifdef LINUX
# define OS_TYPE "LINUX"
# define LINUX_STACKBOTTOM
# undef STACK_GRAN
# define STACK_GRAN 0x10000000
# define USE_GENERIC_PUSH_REGS
# define DYNAMIC_LOADING
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
# endif
# endif
# ifdef X86_64
# define MACH_TYPE "X86_64"
# define ALIGNMENT 8
@@ -2173,9 +2046,8 @@
# define THREADS
# endif
# if defined(HP_PA) || defined(M88K) \
|| defined(POWERPC) && !defined(DARWIN) \
|| defined(LINT) || defined(MSWINCE) || defined(ARM32) || defined(CRIS) \
# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \
|| defined(LINT) || defined(MSWINCE) || defined(ARM32) \
|| (defined(I386) && defined(__LCC__))
/* Use setjmp based hack to mark from callee-save registers. */
/* The define should move to the individual platform */
@@ -2316,7 +2188,7 @@
# else
# if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
extern void *GC_amiga_get_mem(size_t size);
# define GET_MEM(bytes) HBLKPTR((size_t) \
define GET_MEM(bytes) HBLKPTR((size_t) \
GC_amiga_get_mem((size_t)bytes + GC_page_size) \
+ GC_page_size-1)
# else
@@ -2332,10 +2204,4 @@
#endif /* GC_PRIVATE_H */
#if defined(_AIX) && !defined(__GNUC__) && !defined(__STDC__)
/* IBMs xlc compiler doesn't appear to follow the convention of */
/* defining __STDC__ to be zero in extended mode. */
# define __STDC__ 0
#endif
# endif /* GCCONFIG_H */
+1 -1
View File
@@ -4,7 +4,7 @@
# include "private/gc_priv.h"
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS)
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
#if defined(GC_DARWIN_THREADS)
# include "private/darwin_stop_world.h"
+55 -82
View File
@@ -27,10 +27,6 @@
# endif
# endif
#if defined(RS6000) || defined(POWERPC)
# include <ucontext.h>
#endif
#if defined(__MWERKS__) && !defined(POWERPC)
asm static void PushMacRegisters()
@@ -404,87 +400,64 @@ void GC_push_regs()
}
#endif /* !USE_GENERIC_PUSH_REGS && !USE_ASM_PUSH_REGS */
void GC_with_callee_saves_pushed(fn, arg)
void (*fn)();
ptr_t arg;
{
word dummy;
# if defined(USE_GENERIC_PUSH_REGS)
# ifdef HAVE_BUILTIN_UNWIND_INIT
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
__builtin_unwind_init();
# else /* !HAVE_BUILTIN_UNWIND_INIT */
# if defined(RS6000) || defined(POWERPC)
/* FIXME: RS6000 means AIX. */
/* This should probably be used in all Posix/non-gcc */
/* settings. We defer that change to minimize risk. */
ucontext_t ctxt;
getcontext(&ctxt);
# else
/* Generic code */
/* The idea is due to Parag Patel at HP. */
/* We're not sure whether he would like */
/* to be he acknowledged for it or not. */
jmp_buf regs;
register word * i = (word *) regs;
register ptr_t lim = (ptr_t)(regs) + (sizeof regs);
/* Setjmp doesn't always clear all of the buffer. */
/* That tends to preserve garbage. Clear it. */
for (; (char *)i < lim; i++) {
*i = 0;
}
# if defined(MSWIN32) || defined(MSWINCE) \
|| defined(UTS4) || defined(LINUX) || defined(EWS4800)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
/* We don't want to mess with signals. According to */
/* SUSV3, setjmp() may or may not save signal mask. */
/* _setjmp won't, but is less portable. */
# endif
# endif /* !AIX ... */
# endif /* !HAVE_BUILTIN_UNWIND_INIT */
# else
# if defined(PTHREADS) && !defined(MSWIN32) /* !USE_GENERIC_PUSH_REGS */
/* We may still need this to save thread contexts. */
ucontext_t ctxt;
getcontext(&ctxt);
# else /* Shouldn't be needed */
ABORT("Unexpected call to GC_with_callee_saves_pushed");
# endif
# endif
# if (defined(SPARC) && !defined(HAVE_BUILTIN_UNWIND_INIT)) \
|| defined(IA64)
/* On a register window machine, we need to save register */
/* contents on the stack for this to work. The setjmp */
/* is probably not needed on SPARC, since pointers are */
/* only stored in windowed or scratch registers. It is */
/* needed on IA64, since some non-windowed registers are */
/* preserved. */
{
GC_save_regs_ret_val = GC_save_regs_in_stack();
/* On IA64 gcc, could use __builtin_ia64_flushrs() and */
/* __builtin_ia64_flushrs(). The latter will be done */
/* implicitly by __builtin_unwind_init() for gcc3.0.1 */
/* and later. */
}
# endif
fn(arg);
/* Strongly discourage the compiler from treating the above */
/* as a tail-call, since that would pop the register */
/* contents before we get a chance to look at them. */
GC_noop1((word)(&dummy));
}
#if defined(USE_GENERIC_PUSH_REGS)
void GC_generic_push_regs(cold_gc_frame)
ptr_t cold_gc_frame;
{
GC_with_callee_saves_pushed(GC_push_current_stack, cold_gc_frame);
{
word dummy;
# ifdef HAVE_BUILTIN_UNWIND_INIT
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
__builtin_unwind_init();
# else /* !HAVE_BUILTIN_UNWIND_INIT */
/* Generic code */
/* The idea is due to Parag Patel at HP. */
/* We're not sure whether he would like */
/* to be he acknowledged for it or not. */
jmp_buf regs;
register word * i = (word *) regs;
register ptr_t lim = (ptr_t)(regs) + (sizeof regs);
/* Setjmp doesn't always clear all of the buffer. */
/* That tends to preserve garbage. Clear it. */
for (; (char *)i < lim; i++) {
*i = 0;
}
# if defined(POWERPC) || defined(MSWIN32) || defined(MSWINCE) \
|| defined(UTS4) || defined(LINUX) || defined(EWS4800)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
/* We don't want to mess with signals. According to */
/* SUSV3, setjmp() may or may not save signal mask. */
/* _setjmp won't, but is less portable. */
# endif
# endif /* !HAVE_BUILTIN_UNWIND_INIT */
# if (defined(SPARC) && !defined(HAVE_BUILTIN_UNWIND_INIT)) \
|| defined(IA64)
/* On a register window machine, we need to save register */
/* contents on the stack for this to work. The setjmp */
/* is probably not needed on SPARC, since pointers are */
/* only stored in windowed or scratch registers. It is */
/* needed on IA64, since some non-windowed registers are */
/* preserved. */
{
GC_save_regs_ret_val = GC_save_regs_in_stack();
/* On IA64 gcc, could use __builtin_ia64_flushrs() and */
/* __builtin_ia64_flushrs(). The latter will be done */
/* implicitly by __builtin_unwind_init() for gcc3.0.1 */
/* and later. */
}
# endif
GC_push_current_stack(cold_gc_frame);
/* Strongly discourage the compiler from treating the above */
/* as a tail-call, since that would pop the register */
/* contents before we get a chance to look at them. */
GC_noop1((word)(&dummy));
}
}
#endif /* USE_GENERIC_PUSH_REGS */
@@ -492,7 +465,7 @@ ptr_t cold_gc_frame;
/* the stack. Return sp. */
# ifdef SPARC
asm(" .seg \"text\"");
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD)
# if defined(SVR4) || defined(NETBSD)
asm(" .globl GC_save_regs_in_stack");
asm("GC_save_regs_in_stack:");
asm(" .type GC_save_regs_in_stack,#function");
+1 -2
View File
@@ -172,8 +172,7 @@ int obj_kind;
# endif /* REDIRECT_REALLOC */
/* Allocate memory such that only pointers to near the */
/* beginning of the object are considered. */
/* The same thing, except caller does not hold allocation lock. */
/* We avoid holding allocation lock while we clear memory. */
ptr_t GC_generic_malloc_ignore_off_page(lb, k)
register size_t lb;
+6 -6
View File
@@ -858,9 +858,9 @@ mse * GC_steal_mark_stack(mse * low, mse * high, mse * local,
++top;
top -> mse_descr = descr;
top -> mse_start = p -> mse_start;
GC_ASSERT( (top -> mse_descr & GC_DS_TAGS) != GC_DS_LENGTH ||
top -> mse_descr < (ptr_t)GC_greatest_plausible_heap_addr
- (ptr_t)GC_least_plausible_heap_addr);
GC_ASSERT( top -> mse_descr & GC_DS_TAGS != GC_DS_LENGTH ||
top -> mse_descr < GC_greatest_plausible_heap_addr
- GC_least_plausible_heap_addr);
/* If this is a big object, count it as */
/* size/256 + 1 objects. */
++i;
@@ -1450,8 +1450,8 @@ void GC_push_all_eager(bottom, top)
ptr_t bottom;
ptr_t top;
{
word * b = (word *)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
word * t = (word *)(((word) top) & ~(ALIGNMENT-1));
word * b = (word *)(((long) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
word * t = (word *)(((long) top) & ~(ALIGNMENT-1));
register word *p;
register word q;
register word *lim;
@@ -1739,7 +1739,7 @@ register hdr * hhdr;
{
register int sz = hhdr -> hb_sz;
if (sz <= MAXOBJSZ) {
if (sz < MAXOBJSZ) {
return(GC_page_was_dirty(h));
} else {
register ptr_t p = (ptr_t)h;
+1 -4
View File
@@ -368,11 +368,8 @@ ptr_t p;
ptr_t GC_approx_sp()
{
VOLATILE word dummy;
word dummy;
dummy = 42; /* Force stack to grow if necessary. Otherwise the */
/* later accesses might cause the kernel to think we're */
/* doing something wrong. */
# ifdef _MSC_VER
# pragma warning(disable:4172)
# endif
+2 -5
View File
@@ -246,7 +246,7 @@ void *arg2;
byte_sz = WORDS_TO_BYTES(word_sz);
if (GC_all_interior_pointers) {
/* We need one extra byte; don't fill in GC_size_map[byte_sz] */
byte_sz -= EXTRA_BYTES;
byte_sz--;
}
for (j = low_limit; j <= byte_sz; j++) GC_size_map[j] = word_sz;
@@ -804,10 +804,7 @@ void GC_init_inner()
void GC_enable_incremental GC_PROTO(())
{
# if !defined(SMALL_CONFIG) && !defined(KEEP_BACK_PTRS)
/* If we are keeping back pointers, the GC itself dirties all */
/* pages on which objects have been marked, making */
/* incremental GC pointless. */
# if !defined(SMALL_CONFIG)
if (!GC_find_leak) {
DCL_LOCK_STATE;
+91 -149
View File
@@ -60,10 +60,6 @@
# include <signal.h>
# endif
#if defined(LINUX) || defined(LINUX_STACKBOTTOM)
# include <ctype.h>
#endif
/* Blatantly OS dependent routines, except for those that are related */
/* to dynamic loading. */
@@ -84,7 +80,7 @@
# define NEED_FIND_LIMIT
# endif
#if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__))
#if defined(FREEBSD) && defined(I386)
# include <machine/trap.h>
# if !defined(PCR)
# define NEED_FIND_LIMIT
@@ -254,11 +250,30 @@ word GC_apply_to_maps(word (*fn)(char *))
// XXXXXXXX-XXXXXXXX r-xp 00000000 30:05 260537 name of mapping...\n
// ^^^^^^^^ ^^^^^^^^ ^^^^ ^^
// start end prot maj_dev
// 0 9 18 32
//
// For 64 bit ABIs:
// 0 17 34 56
//
// Note that since about auguat 2003 kernels, the columns no longer have
// fixed offsets on 64-bit kernels. Hence we no longer rely on fixed offsets
// anywhere, which is safer anyway.
// The parser is called with a pointer to the entry and the return value
// is either NULL or is advanced to the next entry(the byte after the
// trailing '\n'.)
//
#if CPP_WORDSZ == 32
# define OFFSET_MAP_START 0
# define OFFSET_MAP_END 9
# define OFFSET_MAP_PROT 18
# define OFFSET_MAP_MAJDEV 32
# define ADDR_WIDTH 8
#endif
#if CPP_WORDSZ == 64
# define OFFSET_MAP_START 0
# define OFFSET_MAP_END 17
# define OFFSET_MAP_PROT 34
# define OFFSET_MAP_MAJDEV 56
# define ADDR_WIDTH 16
#endif
/*
* Assign various fields of the first line in buf_ptr to *start, *end,
@@ -267,46 +282,37 @@ word GC_apply_to_maps(word (*fn)(char *))
char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
char *prot_buf, unsigned int *maj_dev)
{
char *start_start, *end_start, *prot_start, *maj_dev_start;
char *p;
char *endp;
int i;
char *tok;
if (buf_ptr == NULL || *buf_ptr == '\0') {
return NULL;
}
p = buf_ptr;
while (isspace(*p)) ++p;
start_start = p;
GC_ASSERT(isxdigit(*start_start));
*start = strtoul(start_start, &endp, 16); p = endp;
GC_ASSERT(*p=='-');
++p;
end_start = p;
GC_ASSERT(isxdigit(*end_start));
*end = strtoul(end_start, &endp, 16); p = endp;
GC_ASSERT(isspace(*p));
while (isspace(*p)) ++p;
prot_start = p;
GC_ASSERT(*prot_start == 'r' || *prot_start == '-');
memcpy(prot_buf, prot_start, 4);
memcpy(prot_buf, buf_ptr+OFFSET_MAP_PROT, 4);
/* do the protections first. */
prot_buf[4] = '\0';
if (prot_buf[1] == 'w') {/* we can skip the rest if it's not writable. */
/* Skip past protection field to offset field */
while (!isspace(*p)) ++p; while (isspace(*p)) ++p;
GC_ASSERT(isxdigit(*p));
/* Skip past offset field, which we ignore */
while (!isspace(*p)) ++p; while (isspace(*p)) ++p;
maj_dev_start = p;
GC_ASSERT(isxdigit(*maj_dev_start));
*maj_dev = strtoul(maj_dev_start, NULL, 16);
if (prot_buf[1] == 'w') {/* we can skip all of this if it's not writable. */
tok = buf_ptr;
buf_ptr[OFFSET_MAP_START+ADDR_WIDTH] = '\0';
*start = strtoul(tok, NULL, 16);
tok = buf_ptr+OFFSET_MAP_END;
buf_ptr[OFFSET_MAP_END+ADDR_WIDTH] = '\0';
*end = strtoul(tok, NULL, 16);
buf_ptr += OFFSET_MAP_MAJDEV;
tok = buf_ptr;
while (*buf_ptr != ':') buf_ptr++;
*buf_ptr++ = '\0';
*maj_dev = strtoul(tok, NULL, 16);
}
while (*p && *p++ != '\n');
while (*buf_ptr && *buf_ptr++ != '\n');
return p;
return buf_ptr;
}
#endif /* Need to parse /proc/self/maps. */
@@ -698,8 +704,8 @@ ptr_t GC_get_stack_base()
# if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) \
|| defined(HURD) || defined(NETBSD) || defined(FREEBSD)
static struct sigaction old_segv_act;
# if defined(IRIX5) || defined(HPUX) \
|| defined(HURD) || defined(NETBSD)
# if defined(_sigargs) /* !Irix6.x */ || defined(HPUX) \
|| defined(HURD) || defined(NETBSD) || defined(FREEBSD)
static struct sigaction old_bus_act;
# endif
# else
@@ -731,12 +737,10 @@ ptr_t GC_get_stack_base()
/* and setting a handler at the same time. */
(void) sigaction(SIGSEGV, 0, &old_segv_act);
(void) sigaction(SIGSEGV, &act, 0);
(void) sigaction(SIGBUS, 0, &old_bus_act);
(void) sigaction(SIGBUS, &act, 0);
# else
(void) sigaction(SIGSEGV, &act, &old_segv_act);
# if defined(IRIX5) \
|| defined(HPUX) || defined(HURD) || defined(NETBSD)
# if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
|| defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
/* Under Irix 5.x or HP/UX, we may get SIGBUS. */
/* Pthreads doesn't exist under Irix 5.x, so we */
/* don't have to worry in the threads case. */
@@ -774,8 +778,8 @@ ptr_t GC_get_stack_base()
# if defined(SUNOS5SIGS) || defined(IRIX5) \
|| defined(OSF1) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
(void) sigaction(SIGSEGV, &old_segv_act, 0);
# if defined(IRIX5) \
|| defined(HPUX) || defined(HURD) || defined(NETBSD)
# if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
|| defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
(void) sigaction(SIGBUS, &old_bus_act, 0);
# endif
# else
@@ -855,14 +859,13 @@ ptr_t GC_get_stack_base()
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
# define STAT_SKIP 27 /* Number of fields preceding startstack */
/* field in /proc/self/stat */
#ifdef USE_LIBC_PRIVATES
# pragma weak __libc_stack_end
extern ptr_t __libc_stack_end;
#endif
# ifdef IA64
/* Try to read the backing store base from /proc/self/maps. */
@@ -892,38 +895,33 @@ ptr_t GC_get_stack_base()
return GC_apply_to_maps(backing_store_base_from_maps);
}
# ifdef USE_LIBC_PRIVATES
# pragma weak __libc_ia64_register_backing_store_base
extern ptr_t __libc_ia64_register_backing_store_base;
# endif
# pragma weak __libc_ia64_register_backing_store_base
extern ptr_t __libc_ia64_register_backing_store_base;
ptr_t GC_get_register_stack_base(void)
{
# ifdef USE_LIBC_PRIVATES
if (0 != &__libc_ia64_register_backing_store_base
&& 0 != __libc_ia64_register_backing_store_base) {
/* Glibc 2.2.4 has a bug such that for dynamically linked */
/* executables __libc_ia64_register_backing_store_base is */
/* defined but uninitialized during constructor calls. */
/* Hence we check for both nonzero address and value. */
return __libc_ia64_register_backing_store_base;
}
# endif
word result = backing_store_base_from_proc();
if (0 == result) {
if (0 != &__libc_ia64_register_backing_store_base
&& 0 != __libc_ia64_register_backing_store_base) {
/* Glibc 2.2.4 has a bug such that for dynamically linked */
/* executables __libc_ia64_register_backing_store_base is */
/* defined but uninitialized during constructor calls. */
/* Hence we check for both nonzero address and value. */
return __libc_ia64_register_backing_store_base;
} else {
word result = backing_store_base_from_proc();
if (0 == result) {
/* Use dumb heuristics. Works only for default configuration. */
result = (word)GC_stackbottom - BACKING_STORE_DISPLACEMENT;
result += BACKING_STORE_ALIGNMENT - 1;
result &= ~(BACKING_STORE_ALIGNMENT - 1);
/* Verify that it's at least readable. If not, we goofed. */
GC_noop1(*(word *)result);
}
return (ptr_t)result;
}
return (ptr_t)result;
}
# endif
void *GC_set_stackbottom = NULL;
ptr_t GC_linux_stack_base(void)
{
/* We read the stack base value from /proc/self/stat. We do this */
@@ -943,7 +941,7 @@ void *GC_set_stackbottom = NULL;
/* since the correct value of __libc_stack_end never */
/* becomes visible to us. The second test works around */
/* this. */
# ifdef USE_LIBC_PRIVATES
#if USE_LIBC_PRIVATE_SYMBOLS
if (0 != &__libc_stack_end && 0 != __libc_stack_end ) {
# ifdef IA64
/* Some versions of glibc set the address 16 bytes too */
@@ -953,19 +951,10 @@ void *GC_set_stackbottom = NULL;
} /* Otherwise it's not safe to add 16 bytes and we fall */
/* back to using /proc. */
# else
# ifdef SPARC
/* Older versions of glibc for 64-bit Sparc do not set
* this variable correctly, it gets set to either zero
* or one.
*/
if (__libc_stack_end != (ptr_t) (unsigned long)0x1)
return __libc_stack_end;
# else
return __libc_stack_end;
# endif
# endif
}
# endif
#endif
f = open("/proc/self/stat", O_RDONLY);
if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
ABORT("Couldn't read /proc/self/stat");
@@ -1396,7 +1385,7 @@ int * etext_addr;
}
# endif
# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
# if defined(FREEBSD) && defined(I386) && !defined(PCR)
/* Its unclear whether this should be identical to the above, or */
/* whether it should apply to non-X86 architectures. */
/* For now we don't assume that there is always an empty page after */
@@ -1517,7 +1506,7 @@ void GC_register_data_segments()
# endif
# if 0 && defined(RS6000) /* We now use mmap */
# ifdef RS6000
/* The compiler seems to generate speculative reads one past the end of */
/* an allocated object. Hence we need to make sure that the page */
/* following the last heap page is also mapped. */
@@ -2311,11 +2300,8 @@ GC_bool is_ptrfree;
# if defined(ALPHA) || defined(M68K)
typedef void (* REAL_SIG_PF)(int, int, s_c *);
# else
# if defined(IA64) || defined(HP_PA) || defined(X86_64)
# if defined(IA64) || defined(HP_PA)
typedef void (* REAL_SIG_PF)(int, siginfo_t *, s_c *);
/* FIXME: */
/* According to SUSV3, the last argument should have type */
/* void * or ucontext_t * */
# else
typedef void (* REAL_SIG_PF)(int, s_c);
# endif
@@ -2403,7 +2389,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
# endif
# ifdef FREEBSD
# define SIG_OK (sig == SIGBUS)
# define CODE_OK TRUE
# define CODE_OK (code == BUS_PAGE_FAULT)
# endif
# endif /* SUNOS4 || (FREEBSD && !SUNOS5SIGS) */
@@ -2428,7 +2414,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
# if defined(ALPHA) || defined(M68K)
void GC_write_fault_handler(int sig, int code, s_c * sc)
# else
# if defined(IA64) || defined(HP_PA) || defined(X86_64)
# if defined(IA64) || defined(HP_PA)
void GC_write_fault_handler(int sig, siginfo_t * si, s_c * scp)
# else
# if defined(ARM32)
@@ -2494,7 +2480,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
char * addr = (char *) (scp -> si_addr);
# endif
# ifdef LINUX
# if defined(I386)
# if defined(I386) || defined (X86_64)
char * addr = (char *) (sc.cr2);
# else
# if defined(M68K)
@@ -2529,7 +2515,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
# ifdef ALPHA
char * addr = get_fault_addr(sc);
# else
# if defined(IA64) || defined(HP_PA) || defined(X86_64)
# if defined(IA64) || defined(HP_PA)
char * addr = si -> si_addr;
/* I believe this is claimed to work on all platforms for */
/* Linux 2.3.47 and later. Hopefully we don't have to */
@@ -2541,11 +2527,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
# if defined(ARM32)
char * addr = (char *)sc.fault_address;
# else
# if defined(CRIS)
char * addr = (char *)sc.regs.csraddr;
# else
--> architecture not supported
# endif
--> architecture not supported
# endif
# endif
# endif
@@ -2614,7 +2596,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
# if defined(ALPHA) || defined(M68K)
(*(REAL_SIG_PF)old_handler) (sig, code, sc);
# else
# if defined(IA64) || defined(HP_PA) || defined(X86_64)
# if defined(IA64) || defined(HP_PA)
(*(REAL_SIG_PF)old_handler) (sig, si, scp);
# else
(*(REAL_SIG_PF)old_handler) (sig, sc);
@@ -2708,8 +2690,7 @@ void GC_dirty_init()
struct sigaction act, oldact;
/* We should probably specify SA_SIGINFO for Linux, and handle */
/* the different architectures more uniformly. */
# if defined(IRIX5) || defined(LINUX) && !defined(X86_64) \
|| defined(OSF1) || defined(HURD)
# if defined(IRIX5) || defined(LINUX) || defined(OSF1) || defined(HURD)
act.sa_flags = SA_RESTART;
act.sa_handler = (SIG_PF)GC_write_fault_handler;
# else
@@ -3087,7 +3068,7 @@ word n;
#include <sys/procfs.h>
#include <sys/stat.h>
#define INITIAL_BUF_SZ 16384
#define INITIAL_BUF_SZ 4096
word GC_proc_buf_size = INITIAL_BUF_SZ;
char *GC_proc_buf;
@@ -3422,6 +3403,8 @@ extern kern_return_t exception_raise_state_identity(
#define MAX_EXCEPTION_PORTS 16
static mach_port_t GC_task_self;
static struct {
mach_msg_type_number_t count;
exception_mask_t masks[MAX_EXCEPTION_PORTS];
@@ -3748,7 +3731,7 @@ static kern_return_t GC_forward_exception(
exception_behavior_t behavior;
thread_state_flavor_t flavor;
thread_state_t thread_state;
thread_state_data_t thread_state;
mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX;
for(i=0;i<GC_old_exc_ports.count;i++)
@@ -3809,23 +3792,13 @@ catch_exception_raise(
char *addr;
struct hblk *h;
int i;
# if defined(POWERPC)
# if CPP_WORDSZ == 32
thread_state_flavor_t flavor = PPC_EXCEPTION_STATE;
mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE_COUNT;
ppc_exception_state_t exc_state;
# else
thread_state_flavor_t flavor = PPC_EXCEPTION_STATE64;
mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE64_COUNT;
ppc_exception_state64_t exc_state;
# endif
# elif defined(I386)
thread_state_flavor_t flavor = i386_EXCEPTION_STATE;
mach_msg_type_number_t exc_state_count = i386_EXCEPTION_STATE_COUNT;
i386_exception_state_t exc_state;
# else
#ifdef POWERPC
thread_state_flavor_t flavor = PPC_EXCEPTION_STATE;
mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE_COUNT;
ppc_exception_state_t exc_state;
#else
# error FIXME for non-ppc darwin
# endif
#endif
if(exception != EXC_BAD_ACCESS || code[0] != KERN_PROTECTION_FAILURE) {
@@ -3854,13 +3827,7 @@ catch_exception_raise(
}
/* This is the address that caused the fault */
#if defined(POWERPC)
addr = (char*) exc_state.dar;
#elif defined (I386)
addr = (char*) exc_state.faultvaddr;
#else
# error FIXME for non POWERPC/I386
#endif
if((HDR(addr)) == 0) {
/* Ugh... just like the SIGBUS problem above, it seems we get a bogus
@@ -3991,14 +3958,10 @@ kern_return_t catch_exception_raise_state_identity(
# if defined (DRSNX)
# include <sys/sparc/frame.h>
# else
# if defined(OPENBSD)
# if defined(OPENBSD) || defined(NETBSD)
# include <frame.h>
# else
# if defined(FREEBSD) || defined(NETBSD)
# include <machine/frame.h>
# else
# include <sys/frame.h>
# endif
# include <sys/frame.h>
# endif
# endif
# endif
@@ -4027,16 +3990,6 @@ kern_return_t catch_exception_raise_state_identity(
#if NARGS == 0 && NFRAMES % 2 == 0 /* No padding */ \
&& defined(GC_HAVE_BUILTIN_BACKTRACE)
#ifdef REDIRECT_MALLOC
/* Deal with possible malloc calls in backtrace by omitting */
/* the infinitely recursing backtrace. */
# ifdef THREADS
__thread /* If your compiler doesn't understand this */
/* you could use something like pthread_getspecific. */
# endif
GC_in_save_callers = FALSE;
#endif
void GC_save_callers (info)
struct callinfo info[NFRAMES];
{
@@ -4046,26 +3999,15 @@ struct callinfo info[NFRAMES];
/* We retrieve NFRAMES+1 pc values, but discard the first, since it */
/* points to our own frame. */
# ifdef REDIRECT_MALLOC
if (GC_in_save_callers) {
info[0].ci_pc = (word)(&GC_save_callers);
for (i = 1; i < NFRAMES; ++i) info[i].ci_pc = 0;
return;
}
GC_in_save_callers = TRUE;
# endif
GC_ASSERT(sizeof(struct callinfo) == sizeof(void *));
npcs = backtrace((void **)tmp_info, NFRAMES + IGNORE_FRAMES);
BCOPY(tmp_info+IGNORE_FRAMES, info, (npcs - IGNORE_FRAMES) * sizeof(void *));
for (i = npcs - IGNORE_FRAMES; i < NFRAMES; ++i) info[i].ci_pc = 0;
# ifdef REDIRECT_MALLOC
GC_in_save_callers = FALSE;
# endif
}
#else /* No builtin backtrace; do it ourselves */
#if (defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD)) && defined(SPARC)
#if (defined(OPENBSD) || defined(NETBSD)) && defined(SPARC)
# define FR_SAVFP fr_fp
# define FR_SAVPC fr_pc
#else
+4 -5
View File
@@ -1,7 +1,7 @@
; GC_push_regs function. Under some optimization levels GCC will clobber
; some of the non-volatile registers before we get a chance to save them
; therefore, this cannot be inline asm.
; therefore, this can't be inline asm.
.text
.align 2
@@ -64,8 +64,7 @@ _GC_push_regs:
; PIC stuff, generated by GCC
.data
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.align 2
.picsymbol_stub
L_GC_push_one$stub:
.indirect_symbol _GC_push_one
mflr r0
@@ -74,12 +73,12 @@ L0$_GC_push_one:
mflr r11
addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
mtlr r0
lwzu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
lwz r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
mtctr r12
addi r11,r11,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
bctr
.data
.lazy_symbol_pointer
L_GC_push_one$lazy_ptr:
.indirect_symbol _GC_push_one
.long dyld_stub_binding_helper
+18 -23
View File
@@ -2,7 +2,7 @@
* Copyright (c) 1994 by Xerox Corporation. All rights reserved.
* Copyright (c) 1996 by Silicon Graphics. All rights reserved.
* Copyright (c) 1998 by Fergus Henderson. All rights reserved.
* Copyright (c) 2000-2004 by Hewlett-Packard Company. All rights reserved.
* Copyright (c) 2000-2001 by Hewlett-Packard Company. All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
@@ -50,7 +50,8 @@
# include "private/pthread_support.h"
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS)
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_AIX_THREADS)
# if defined(GC_HPUX_THREADS) && !defined(USE_PTHREAD_SPECIFIC) \
&& !defined(USE_COMPILER_TLS)
@@ -67,8 +68,7 @@
# endif
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) \
&& !defined(USE_PTHREAD_SPECIFIC)
defined(GC_DARWIN_THREADS)) && !defined(USE_PTHREAD_SPECIFIC)
# define USE_PTHREAD_SPECIFIC
# endif
@@ -122,7 +122,7 @@
# include <semaphore.h>
#endif /* !GC_DARWIN_THREADS */
#if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
#if defined(GC_DARWIN_THREADS)
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
@@ -948,9 +948,9 @@ int GC_get_nprocs()
/* We hold the allocation lock. */
void GC_thr_init()
{
# ifndef GC_DARWIN_THREADS
int dummy;
# endif
# ifndef GC_DARWIN_THREADS
int dummy;
# endif
GC_thread t;
if (GC_thr_initialized) return;
@@ -982,15 +982,14 @@ void GC_thr_init()
# if defined(GC_HPUX_THREADS)
GC_nprocs = pthread_num_processors_np();
# endif
# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS)
# if defined(GC_OSF1_THREADS)
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
# if defined(GC_IRIX_THREADS)
GC_nprocs = sysconf(_SC_NPROC_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# if defined(GC_FREEBSD_THREADS)
GC_nprocs = 1;
# endif
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
# if defined(GC_DARWIN_THREADS)
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
@@ -1037,8 +1036,6 @@ void GC_thr_init()
/* Disable true incremental collection, but generational is OK. */
GC_time_limit = GC_TIME_UNLIMITED;
}
/* If we are using a parallel marker, actually start helper threads. */
if (GC_parallel) start_mark_threads();
# endif
}
@@ -1055,6 +1052,10 @@ void GC_init_parallel()
/* GC_init() calls us back, so set flag first. */
if (!GC_is_initialized) GC_init();
/* If we are using a parallel marker, start the helper threads. */
# ifdef PARALLEL_MARK
if (GC_parallel) start_mark_threads();
# endif
/* Initialize thread local free lists if used. */
# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
LOCK();
@@ -1368,7 +1369,7 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
if (!GC_thr_initialized) GC_thr_init();
# ifdef GC_ASSERTIONS
{
size_t stack_size;
int stack_size;
if (NULL == attr) {
pthread_attr_t my_attr;
pthread_attr_init(&my_attr);
@@ -1376,13 +1377,7 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
} else {
pthread_attr_getstacksize(attr, &stack_size);
}
# ifdef PARALLEL_MARK
GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
# else
/* FreeBSD-5.3/Alpha: default pthread stack is 64K, */
/* HBLKSIZE=8192, sizeof(word)=8 */
GC_ASSERT(stack_size >= 65536);
# endif
GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
/* Our threads may need to do some work for the GC. */
/* Ridiculously small threads won't work, and they */
/* probably wouldn't work anyway. */
+1 -1
View File
@@ -888,7 +888,7 @@ void GC_print_block_list()
{
struct Print_stats pstats;
GC_printf1("(kind(0=ptrfree,1=normal,2=unc.,%lu=stubborn):size_in_bytes, #_marks_set)\n", STUBBORN);
GC_printf0("(kind(0=ptrfree,1=normal,2=unc.,3=stubborn):size_in_bytes, #_marks_set)\n");
pstats.number_of_blocks = 0;
pstats.total_bytes = 0;
GC_apply_to_all_blocks(GC_print_block_descr, (word)&pstats);
+1 -2
View File
@@ -16,9 +16,8 @@
* Modified by Peter C. for Solaris Posix Threads.
*/
# include "private/gc_priv.h"
# if defined(GC_SOLARIS_PTHREADS)
# include "private/gc_priv.h"
# include <pthread.h>
# include <thread.h>
# include <signal.h>
+8 -11
View File
@@ -16,9 +16,9 @@
*/
/* Boehm, September 14, 1994 4:44 pm PDT */
# include "private/gc_priv.h"
# if defined(GC_SOLARIS_THREADS) || defined(GC_SOLARIS_PTHREADS)
# include "private/gc_priv.h"
# include "private/solaris_threads.h"
# include <thread.h>
# include <synch.h>
@@ -248,8 +248,8 @@ static void stop_all_lwps()
for (i = 0; i < max_lwps; i++)
last_ids[i] = 0;
for (;;) {
if (syscall(SYS_ioctl, GC_main_proc_fd, PIOCSTATUS, &status) < 0)
ABORT("Main PIOCSTATUS failed");
if (syscall(SYS_ioctl, GC_main_proc_fd, PIOCSTATUS, &status) < 0)
ABORT("Main PIOCSTATUS failed");
if (status.pr_nlwp < 1)
ABORT("Invalid number of lwps returned by PIOCSTATUS");
if (status.pr_nlwp >= max_lwps) {
@@ -262,7 +262,7 @@ static void stop_all_lwps()
for (i = 0; i < max_lwps; i++)
last_ids[i] = 0;
continue;
}
}
if (syscall(SYS_ioctl, GC_main_proc_fd, PIOCLWPIDS, GC_current_ids) < 0)
ABORT("PIOCLWPIDS failed");
changed = FALSE;
@@ -803,7 +803,6 @@ void GC_thr_init(void)
{
GC_thread t;
thread_t tid;
int ret;
if (GC_thr_initialized)
return;
@@ -821,11 +820,9 @@ void GC_thr_init(void)
t = GC_new_thread(thr_self());
t -> stack_size = 0;
t -> flags = DETACHED | CLIENT_OWNS_STACK;
ret = thr_create(0 /* stack */, 0 /* stack_size */, GC_thr_daemon,
0 /* arg */, THR_DETACHED | THR_DAEMON,
&tid /* thread_id */);
if (ret != 0) {
GC_err_printf1("Thr_create returned %ld\n", ret);
if (thr_create(0 /* stack */, 0 /* stack_size */, GC_thr_daemon,
0 /* arg */, THR_DETACHED | THR_DAEMON,
&tid /* thread_id */) != 0) {
ABORT("Cant fork daemon");
}
thr_setprio(tid, 126);
+1 -2
View File
@@ -11,10 +11,9 @@
* modified is included with the above copyright notice.
*/
#include "private/gc_priv.h" /* For GC_compare_and_exchange, GC_memory_barrier */
#if defined(GC_LINUX_THREADS)
#include "private/gc_priv.h" /* For GC_compare_and_exchange, GC_memory_barrier */
#include "private/specific.h"
static tse invalid_tse = {INVALID_QTID, 0, 0, INVALID_THREADID};
+1 -9
View File
@@ -1,4 +1,3 @@
# include "gc_config_macros.h"
# include "private/gcconfig.h"
# include <stdio.h>
@@ -11,17 +10,10 @@ int main()
"-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
# endif
# if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
|| defined(GC_SOLARIS_PTHREADS) \
|| defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
printf("-lpthread\n");
# endif
# if defined(GC_FREEBSD_THREADS)
# if (__FREEBSD_version >= 500000)
printf("-lpthread\n");
# else
printf("-pthread\n");
# endif
# endif
# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
printf("-lpthread -lrt\n");
# endif
+2 -2
View File
@@ -2,8 +2,8 @@
/* Eventually this one may become unnecessary. For now we need */
/* it to keep the old-style build process working. */
#define GC_TMP_VERSION_MAJOR 6
#define GC_TMP_VERSION_MINOR 6
#define GC_TMP_ALPHA_VERSION GC_NOT_ALPHA
#define GC_TMP_VERSION_MINOR 3
#define GC_TMP_ALPHA_VERSION 6
#ifndef GC_NOT_ALPHA
# define GC_NOT_ALPHA 0xff
+2 -13
View File
@@ -1,7 +1,6 @@
#include "private/gc_priv.h"
#if defined(GC_WIN32_THREADS)
#include "private/gc_priv.h"
#include <windows.h>
#ifdef CYGWIN32
@@ -11,7 +10,6 @@
# undef pthread_create
# undef pthread_sigmask
# undef pthread_join
# undef pthread_detach
# undef dlopen
# define DEBUG_CYGWIN_THREADS 0
@@ -197,7 +195,7 @@ static void GC_delete_thread(DWORD thread_id) {
/* Must still be in_use, since nobody else can store our thread_id. */
i++) {}
if (i > my_max) {
WARN("Removing nonexistent thread %ld\n", (GC_word)thread_id);
WARN("Removing nonexisiting thread %ld\n", (GC_word)thread_id);
} else {
GC_delete_gc_thread(thread_table+i);
}
@@ -244,9 +242,6 @@ void GC_push_thread_structures GC_PROTO((void))
# endif
}
/* Defined in misc.c */
extern CRITICAL_SECTION GC_write_cs;
void GC_stop_world()
{
DWORD thread_id = GetCurrentThreadId();
@@ -255,9 +250,6 @@ void GC_stop_world()
if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()");
GC_please_stop = TRUE;
# ifndef CYGWIN32
EnterCriticalSection(&GC_write_cs);
# endif /* !CYGWIN32 */
for (i = 0; i <= GC_get_max_thread_index(); i++)
if (thread_table[i].stack_base != 0
&& thread_table[i].id != thread_id) {
@@ -288,9 +280,6 @@ void GC_stop_world()
# endif
thread_table[i].suspended = TRUE;
}
# ifndef CYGWIN32
LeaveCriticalSection(&GC_write_cs);
# endif /* !CYGWIN32 */
}
void GC_start_world()
+29 -66
View File
@@ -490,35 +490,6 @@
RelativePath="mono\utils\strtod.h"
>
</File>
<File
RelativePath="mono\utils\mono-counters.h"
>
</File>
<File
RelativePath="mono\utils\mono-counters.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="0"
BrowseInformation="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="metadata"
@@ -1654,6 +1625,35 @@
RelativePath="mono\os\gc_wrapper.h"
>
</File>
<File
RelativePath="mono\os\win32\util.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="0"
BrowseInformation="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="mono\os\util.h"
>
</File>
</Filter>
<Filter
Name="mini"
@@ -1687,10 +1687,6 @@
RelativePath="mono\mini\abcremoval.h"
>
</File>
<File
RelativePath=".\mono\mini\aliasing.c"
>
</File>
<File
RelativePath="mono\mini\aot.c"
>
@@ -1716,10 +1712,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=".\mono\mini\branch-opts.c"
>
</File>
<File
RelativePath="mono\mini\cfold.c"
>
@@ -2056,10 +2048,6 @@
RelativePath="mono\mini\mini-x86.h"
>
</File>
<File
RelativePath="mono\mini\jit-icalls.h"
>
</File>
<File
RelativePath="mono\mini\mini.c"
>
@@ -2089,31 +2077,6 @@
RelativePath="mono\mini\mini.h"
>
</File>
<File
RelativePath="mono\mini\jit-icalls.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="0"
BrowseInformation="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="mono\mini\regalloc.c"
>
-18
View File
@@ -1,18 +0,0 @@
2006-03-15 Miguel de Icaza <[email protected]>
* mono.1: Document MONO_XEXCEPTIONS and MONO_XSYNC, create new
section, sort the previous enviornment section.
2006-03-06 Lluis Sanchez Gual <[email protected]>
* mono.1: Updated MONO_XMLSERIALIZER_THS option information.
2006-02-22 Jelmer Vernooij <[email protected]>
* mbas.1, Makefile.am: Add manpage for mbas (based on mcs.1)
2006-01-26 Jonathan Pryor <[email protected]>
* ChangeLog: Started
* mono-shlib-cop.1: Document another BUG/design issue that it doesn't check
for; formatting/style changes.
+1 -1
View File
@@ -2,6 +2,6 @@ man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharp.1 oldmono.1 ilasm.1 \
cert2spc.1 cilc.1 genxs.1 wsdl.1 disco.1 soapsuds.1 makecert.1 \
chktrust.1 setreg.1 sn.1 secutil.1 signcode.1 certmgr.1 monop.1 xsd.1 gacutil.1 \
macpack.1 mkbundle.1 dtd2xsd.1 permview.1 prj2make.1 mono-service.1 mono-shlib-cop.1 \
al.1 mozroots.1 mono-xmltool.1 mbas.1
al.1 mozroots.1
EXTRA_DIST = $(man_MANS)
+12 -30
View File
@@ -13,60 +13,42 @@
macpack \- Macintosh OS X Packager for managed gui assemblies
.SH SYNOPSIS
.PP
.B macpack [options] assembly
.B macpack [options]
.SH DESCRIPTION
\fImacpack\fP is a tool used to package managed assemblies (like
System.Windows.Forms or Cocoa#) that require gui availability for deployment
on Mac OS X.
.PP
macpack will prepare a OS X compatible bundle from the provided assembly
and resources. The bundle will include the specified assembly as well
as any of the provided resources (specified with the -resource: switch).
.PP
Developers can specify the kind of application to produce using the
-mode: argument. This controls how the environment in the Mono class
libraries is setup.
and resources.
.PP
.SH OPTIONS
.I "-a assembly"
.I "-a" <assembly location>
.Sp
This option tells macpack where the managed assembly that you
want to bundle resides. This option is also used to point to the shell
script to launch in the case of a X11/Gtk# application.
.Sp
This is the same as just passing the assembly as an argument.
.I "-m" <mode>
.Sp
.I "-m [winforms,x11,console,cocoa]"
or
.I "-mode:[winforms,x11,console,cocoa]"
An integer parameter of the mode (Cocoa# or System.Windows.Forms or X11).
System.Windows.Forms = 1
Cocoa# = 2
Gtk#/X11 = 3
.Sp
A value indicating the kind of application: WinForms is a Winforms
application running on Quartz; X11 is an application that requires
the X11 server to run; console is a non-graphical application; cocoa
is an application based on Cocoa#
.Sp
.I "-n NAME"
or
.I "-name:NAME"
.I "-n" <application name>
.Sp
This option specifies the application name of the emitted bundle.
This is what you will see in Finder.
.Sp
.I "-o DIRECTORY"
or
.I "-output:DIRECTORY"
.I "-o" <output path>
.Sp
This option specifies the path to output the generated Application.
.Sp
.I "-r RESOURCE"
or
.I "-resource:RESOURCE"
.I "-r" <resource>
.Sp
This option can be specified multiple times. It will place a copy of each resource
into the bundles resources directory. Alternatively, you can use a
comma separated list of resources.
into the bundles resources directory.
.fi
.SH AUTHOR
Geoff Norton
.SH WEB SITE
Visit: http://www.mono-project.com for details
-240
View File
@@ -1,240 +0,0 @@
.TH mbas 1 "21 February 2006"
.SH NAME
mbas \- Mono Basic Compiler.
.SH SYNOPSIS
.B mbas
[option] [source-files]
.SH DESCRIPTION
.PP
.I MonoBASIC (mbas)
is a CIL compiler for the VisualBasic.NET language, an
extended version of Visual Basic.
.PP
Applications developed on Windows with vbc can execute on Mono and applications
compiled with 'mbas' can be executed on .NET runtime.
.PP
The Mono Basic compiler accepts the same options as
the Microsoft VB.NET compiler. Those options can start with a slash or a
dash (/checked is the same as -checked). Additionally to this, the
GNU-like options are supported, those begin with "--". All
-specific flags which are not available in the Microsoft VB.NET
compiler are available only with the GNU-style options.
.PP
Visual Basic.NET source files must end with a ".vb" extension. Compilation of
VB.NET source code requires all the files that make up a library, module or
executable to be provided on the command line. There is no support
for partial compilation. To achieve the benefits of partial
compilation, you should compile programs into their own assemblies,
and later reference them with the "-r" flag.
.PP
The Mono Basic compiler generates images (.exe files) that contain
CIL byte code that can be executed by any system that implements a Common
Language Infrastructure virtual machine such as the Microsoft .NET
runtime engine on Windows or the Mono runtime engine on Unix systems.
Executables are not bound to a specific CPU or operating system.
.PP
The Mono Basic compiler by default only references three assemblies:
mscorlib.dll, System.dll and System.Xml.dll. If you want to
reference extra libraries you must manually specify them using the
-pkg: command line option or the -r: command line option.
Alternatively if you want to get all of the System libraries, you can
use the -pkg:dotnet command line option.
.PP
.SH OPTIONS
.TP
.I \-\-about
Displays information about the Mono Basic compiler
.TP
.I \-\-addmodule:MODULE1[,MODULE2]
Includes the specified modules in the resulting assembly.
.TP
.I -codepage:ID
Specifies the code page used to process the input files from the
point it is specified on. By default files will be processed in the
Latin-1 code page. The compiler will also automatically detect
Unicode files that have an embedded byte mark at the beginning.
.TP
Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001 (UTF-8).
.TP
Mono Basic supports a couple of shorthands: "utf8" can be used to specify utf-8 instead
of using the cryptic 65001 and "reset" restores the automatic handling of
code pages. These shorthands are not available on the Microsoft compiler.
.TP
.I \-define:SYMLIST, -d:SYMLIST
Defines the symbol listed by the semi-colon separeted list SYMLIST
SYMBOL. This can be tested in the source code by the pre-processor,
or can be used by methods that have been tagged with the Conditional
attribute.
.TP
.I \-debug-args:arguments
Debugger arguments.
.TP
.I \-debug:AMOUNT
Specify the amount of debugging information to emit. Possible values for
AMOUNT are "full" and "pdbonly".
.TP
.I \-~, \-debugoptions
Show debugging info while processing options.
.TP
.I \-\-fatal
This is used for debugging the compiler. This makes the error emission
generate an exception that can be caught by a debugger.
.TP
.I \-imports:import-list
Declare global Imports for listed namespaces.
.TP
.I \-ignorewarn:XXXX
Ignores warning number XXXX.
.TP
.I -lib:PATHLIST, -libpath:PATHLIST
Each path specified in the comma-separated list will direct the
compiler to look for libraries in that specified path.
.TP
.I \-L PATH
Directs the compiler to look for libraries in the specified path.
Multiple paths can be provided by using the option multiple times.
.TP
.I \-main:CLASS
Tells the compiler which CLASS or MODULE contains the entry point. Useful when
you are compiling several classes with a Main method.
.TP
.I \-nologo
Suppress printing copyright information on startup.
.TP
.I \-nostdlib, -nostdlib+
Use this flag if you want to compile the core library. This makes the
compiler load its internal types from the assembly being compiled.
.TP
.I \-noconfig, \-noconfig+
Disables the default compiler configuration to be loaded. The
compiler by default has references to the system assemblies.
.TP
.I \-nowarn
Makes the compiler ignore warnings.
.TP
.I \-optioncompare:binary, \-optioncompare:text
Select between binary and text string comparisons. The default is binary
string comparisons.
.TP
.I \-optionexplicit[+|-]
Require explicit declaration of variables
.TP
.I \-optionstrict[+|-]
Enforce strict language semantics
.TP
.I \-out:FNAME, -o FNAME
Names the output file to be generated.
.TP
.I \-\-parse
Used for benchmarking. The compiler will only parse its input files.
Currently ignored.
.TP
.I \-pkg:package1[,packageN]
The compiler will invoke pkg-config --libs on the set of packages
specified on the command line to obtain libraries and directories to
compile the code.
.PP
This is typically used with third party components, like this:
.nf
$ mbas -pkg:gtk-sharp demo.vb
.fi
.TP
.TP
.I \-pkg:dotnet
This will instruct the compiler to reference the System.* libraries
available on a typical dotnet framework installation, notice that this
does not include all of the Mono libraies, only the System.* ones. This
is a convenient shortcut for those porting code.
.TP
.I -q -quiet
Commands the compiler to show only error messages for syntax-related errors
and warnings.
.TP
.I -resource:RESOURCE[,ID]
Embeds to the given resource file. The optional ID can be used to
give a different name to the resource. If not specified, the resource
name will be the file name.
.TP
.I -linkresource:RESOURCE[,ID]
Links to the specified RESOURCE. The optional ID can be used to give
a name to the linked resource.
.TP
.I -r:ASSEMBLY1[,ASSEMBLY2], \-r ASSEMBLY1[,ASSEMBLY2]
Reference the named assemblies. Use this to use classes from the named
assembly in your program. The assembly will be loaded from either the
system directory where all the assemblies live, or from the path
explicitly given with the -L option.
.PP
You can also use a semicolon to separate the assemblies instead of a
comma.
.TP
.I \-removeintchecks[+|-]
Remove integer checks. Default off.
.TP
.I \-rootnamespace:namespace
Specifies the root namespace for all type declarations
.TP
.I \-\-stacktrace
Generates a stack trace at the time the error is reported, useful for
debugging the compiler.
.TP
.I \-target:KIND, \-t:KIND
Used to specify the desired target. The possible values are: exe
(plain executable), winexe (Windows.Forms executable), library
(component libraries) and module (partial library).
.TP
.I \-\-timestamp
Another debugging flag. Used to display the times at various points
in the compilation process.
.TP
.I \-tokenize
Only tokenizes source files. Currently ignored.
.TP
.I \-unsafe, -unsafe+
Enables compilation of unsafe code.
.TP
.I \-utf8output[+|-]
Emit compiler output in UTF8 character encoding. Currently ignored.
.TP
.I \-v
Debugging. Turns on verbose yacc parsing.
.TP
.I -. -verbosegetoptions
Show verbose parsing of options
.TP
.I \-\-version
Shows the compiler version.
.TP
.I \-warnaserror, \-warnaserror+
Treat warnings as errors.
.TP
.I \-wlevel:LEVEL
Sets the warning level. 0 is the lowest warning level, and 4 is the
highest. The default is 2.
.TP
.I \-\-
Use this to stop option parsing, and allow option-looking parameters
to be passed on the command line.
.SH STABILITY
As of early 2006, the Mono Basic compiler is still considered alpha software.
Several language constructions that are accepted by the Microsoft Visual
Basic.NET compiler are refused by the Mono Basic compiler. Occassional
crashes also still occur.
.PP
.SH AUTHORS
See the ChangeLog for authors
.PP
.SH LICENSE
The Mono Basic compiler is released under the terms of the GNU GPL.
Please read the accompanying `COPYING' file for details. Alternative
licenses are available from Ximian.
.PP
.SH SEE ALSO
mcs(1), mono(1), mint(1), sn(1)
.PP
.SH BUGS
To report bugs in the compiler, you can use `bug-buddy', or you can
file bug reports in our bug tracking system:
http://bugzilla.ximian.com.
.SH MAILING LIST
The Mono Basic Mailing List is available at: [email protected]
-5
View File
@@ -144,11 +144,6 @@ is to omit the switch.
ISO-1 - Restrict compiler to use only ISO standardized features.
The usage of features such as generics, static classes, anonymous
methods will lead to error.
.Sp
Notice that this flag only controls the language features available to
the programmer, it does not control the kind of assemblies produced.
Programs compiled with mcs will reference the 1.1 APIs, Programs
compiled with gmcs reference the 2.0 APIs.
.TP
.I -lib:PATHLIST
Each path specified in the comma-separated list will direct the
-13
View File
@@ -87,22 +87,9 @@ When passed, DIR will be set for the MONO_CFG_DIR environment variable
Compresses the assemblies before embedding. This results in smaller
executable files, but increases startup time and requires zlib to be
installed on the target system.
.SH ENVIRONMENT VARIABLES
.TP
.I "AS"
Assembler command. The default is "as".
.TP
.I "CC"
C compiler command. The default is "cc" under Linux and "gcc -mno-cygwin"
under Windows.
.SH FILES
This program will load referenced assemblies from the Mono assembly
cache.
.SH BUGS
The options "--static" and "-z" are not supported under Windows.
Moreover, a full cygwin environment containing at least "gcc" and "as"
is required for the build process. The generated executable does not
depend on cygwin.
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
.SH WEB SITE
+26 -121
View File
@@ -1,13 +1,3 @@
.\"
.\" mono-shlib-cop manual page.
.\" (C) 2005-2006 Jonathan Pryor
.\" Author:
.\" Jonathan Pryor ([email protected])
.\"
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.TH "mono-shlib-cop" 1
.SH NAME
mono-shlib-cop \- Shared Library Usage Checker
@@ -24,7 +14,7 @@ correct.
.SH DESCRIPTION
.I mono-shlib-cop
is a tool that inspects a managed assembly looking for
erroneous or suspecious usage of shared libraries.
erroneous or suspecious behavior of shared libraries.
.PP
The tool takes one or more assembly filenames, and inspects each assembly
specified.
@@ -43,39 +33,25 @@ The warnings checked for include:
Is the target shared library a versioned library? (Relevant only on Unix
systems, not Mac OS X or Windows.)
.PP
In general, only versioned libraries such as
.I libc.so.6
are present on the
user's machine, and efforts to load
.I libc.so
will result in a
.B System.DllNotFoundException.
There are three solutions to this:
In general, only versioned libraries such as libc.so.6 are present on the
user's machine, and efforts to load libc.so will result in a
System.DllNotFoundException. There are three solutions to this:
.TP
1.
Require that the user install any
.I -devel
packages which provide the
Require that the user install any -devel packages which provide the
unversioned library. This usually requires that the user install a large
number of additional packages, complicating the installation process.
.TP
2.
Use a fully versioned name in your
.B DllImport
statements. This requires
Use a fully versioned name in your DllImport statements. This requires
editing your source code and recompiling whenever you need to target a
different version of the shared library.
.TP
3.
Provide an
.I assembly.config
file which contains <dllmap/> elements to remap
Provide an assembly.config file which contains <dllmap/> elements to remap
the shared library name used by your assembly to the actual versioned shared
library present on the users system. Mono provides a number of pre-existing
<dllmap/> entries, including ones for
.I libc.so
and
.I libX11.so.
<dllmap/> entries, including libc.so and libX11.so.
.SH EXAMPLE
The following code contains examples of the above errors and warnings:
.nf
@@ -94,52 +70,26 @@ The following code contains examples of the above errors and warnings:
.TP
Bad library name
Assuming that the library
.I bad-library-name
doesn't exist on your machine,
.I Demo.BadLibraryName
will generate an error, as
it requires a shared library which cannot be loaded.
This may be ignorable; see
.B BUGS
.
.B bad-library-name
doesn't exist on your machine, Demo.BadLibraryName will generate an error, as
it requires a shared library which doesn't exist.
.TP
Bad symbol name
.I Demo.BadSymbolName
will generate an error, as
.I libc.so
(remapped to
.I libc.so.6
by mono's
.I $prefix/etc/mono/config
file) doesn't contain the function
.I BadSymbolName
.
Demo.BadSymbolName will generate an error, as libc.so (remapped to libc.so.6
by mono's $prefix/etc/mono/config file) doesn't contain the function
BadSymbolName.
.TP
Unversioned library dependency
Assuming you have the file
.I libcap.so
,
.I Demo.cap_clear
will generate a
warning because, while
.I libcap.so
could be loaded,
.I libcap.so
might not exist on
the users machine (on FC2,
.I /lib/libcap.so
is provided by
Assuming you have the file libcap.so, Demo.cap_clear will generate a
warning because, while libcap.so could be loaded, libcap.so might not exist on
the users machine (on FC2, /lib/libcap.so is provided by
.I libcap-devel
, and you can't assume that end users will have any
.I "-devel"
packages installed).
, and you can't assume that end users will have any -devel packages installed).
.SH FIXING CODE
The fix depends on the warning or error:
.TP
Bad library names
Use a valid library name in the
.B DllImport
attribute, or provide a <dllmap/>
Use a valid library name in the DllImport attribute, or provide a <dllmap/>
entry to map your existing library name to a valid library name.
.TP
Bad symbol names
@@ -164,16 +114,13 @@ mapping information. For example, with
.I Mono.Posix.dll.config
\.
.PP
The
.I .config
file is an XML document containing a top-level <configuration/>
The .config file is an XML document containing a top-level <configuration/>
section with nested <dllmap/> entries, which contains
.B dll
and
.B target
attributes. The dll attribute should contain the same string used in your
.B DllImport
attribute value, and the target attribute specifies which shared
DllImport attribute value, and the target attribute specifies which shared
library mono should
.I actually
load at runtime.
@@ -185,59 +132,17 @@ A sample .config file is:
</configuration>
.fi
.SH BUGS
.TP
*
Only
.B DllImport
entries are checked; the surrounding IL is ignored. Consequently, if a runtime
check is performed to choose which shared library to invoke, an error will be
reported even though the specified library is never used. Consider this code:
.nf
using System.Runtime.InteropServices; // for DllImport
class Beep {
[DllImport ("kernel32.dll")]
private static extern int Beep (int dwFreq, int dwDuration);
[DllImport ("libcurses.so")]
private static extern int beep ();
public static void Beep ()
{
if (System.IO.Path.DirectorySeparatorChar == '\\\\') {
Beep (750, 300);
}
else {
beep ();
}
}
}
.fi
If
.I mono-shlib-cop
is run on this assembly, an error will be reported for using
.I kernel32.dll
, even though
.I kernel32.dll
will never be used on Unix platforms.
.TP
*
.I mono-shlib-cop
currently only examines the shared library file extension to determine if a
warning should be generated. A
.I .so
extension will always generate a warning, even if the
.I .so
is not a symlink,
isn't provided in a
.I -devel
package, and there is no versioned shared library
(possible examples including
.I /usr/lib/libtcl8.4.so,
.I /usr/lib/libubsec.so,
extension will always generate a warning, even if the .so is not a symlink,
isn't provided in a -devel package, and there is no versioned shared library
(possible examples including /usr/lib/libtcl8.4.so, /usr/lib/libubsec.so,
etc.).
.Sp
.PP
Consequently, warnings for any such libraries are useless, and incorrect.
.Sp
.PP
Windows and Mac OS X will never generate warnings, as these
platforms use different shared library extensions.
.SH MAILING LISTS
-85
View File
@@ -1,85 +0,0 @@
.\"
.\" mono manual page.
.\" (C) 2003 Ximian, Inc.
.\" (C) 2004-2005 Novell, Inc.
.\" Author:
.\" Miguel de Icaza ([email protected])
.\"
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.TH mono-xmltool "Mono 1.0"
.SH NAME
mono-xmltool \- Mono XML validation and transformation tool.
.SH SYNOPSIS
.PP
.B mono-xmltool --validate [*.rng | *.rnc | *.nvdl | *.xsd] [instances]
.PP
.B mono-xmltool --validate-rng relax-ng-grammar-xml [instances]
.PP
.B mono-xmltool --validate-rnc relax-ng-compact-grammar-file [instances]
.PP
.B mono-xmltool --validate-nvdl nvdl-script-xml [instances]
.PP
.B mono-xmltool --validate-xsd xml-schema [instances]
.PP
.B mono-xmltool --transform stylesheet instance-xml
.PP
.B mono-xmltool --prettyprint [source [result]]
.PP
.SH DESCRIPTION
\fImono-xmltool\fP is a command line front end for various functions
available in the Mono XML class libraries, currently it offers
validation with various different kinds of schemas, xslt
transformations and pretty printing.
.PP
.SH XML VALIDATION
mono-xmltool can validate a given set of XML files (the instances
parameter) using the given schema file. Currently supported schema
files include Relax NG (*.rng), Compact Relax NG (*.rnc),
Namespace-based Validation Dispatching Language (*.nvdl) and XML
Schema (*.xsd).
.PP
If invoked with the --validate argument, Mono will use the filename
extension to guess the kind of validation required. The
--validate-xxx flags would force a specific kind of validation.
.PP
The following lists the flags and the actual class that implements
this in Mono:
.TP
.I --validate-rng
.Sp
Commons.Xml.Relaxng.RelaxNgPattern as the schema, and
Commons.Xml.Relaxng.RelaxngValidatingReader validator.
.TP
.I --validate-rnc
Commons.Xml.Relaxng.RncParser as the schema, and
Commons.Xml.Relaxng.RelaxngValidatingReader validator.
.TP
.I --validate-nvdl
.Sp
Commons.Xml.Nvdl as the schema and Commons.Xml.NvdlValidatingReader
validator.
.TP
.I --validate-xsd
System.Xml.Schema.XmlSchema as the schema and uses
System.Xml.XmlValidatingReader as the validator.
.SH TRANSFORMATIONS
This does an XSLT transformation, the stylesheet must be an XSLT file,
the instance-xml is the document to be processed. Output it sent to
the standard output.
.SH PRETTY PRINTING
Produces a prett-print rendering of the
.I source
file. If it is not
specified it reads the standard input. If
.I result
is not specified, the output is sent to the standard output.
.SH MAILING LISTS
Mailing lists are listed at the
http://www.mono-project.com/Mailing_Lists
.SH WEB SITE
http://www.mono-project.com
.SH SEE ALSO
.BR mono(1), mcs(1).
+42 -75
View File
@@ -249,13 +249,6 @@ compiled. This is used for testing the code generator performance.
Displays information about the work done by the runtime during the
execution of an application.
.TP
.I "--wapi=hps|semdel"
Perform maintenance of the process shared data.
.Sp
semdel will delete the global semaphore.
.Sp
hps will list the currently used handles.
.TP
.I "-v", "--verbose"
Increases the verbosity level, each time it is listed, increases the
verbosity level to include more information (including, for example,
@@ -284,13 +277,8 @@ is a profiler-specific string of options for the profiler itself.
.Sp
The default profiler accepts the following options 'alloc' to profile
memory consumption by the application; 'time' to profile the time
spent on each routine; 'jit' to collect time spent JIT-compiling methods
and 'stat' to perform sample statistical profiling.
If no options are provided the default is 'alloc,time,jit'.
.PP
By default the
profile data is printed to stdout: to change this, use the 'file=filename'
option to output the data to filename.
spent on each routine and 'stat' to perform sample statistical
profiling. If no options are provided the default is 'alloc,time'.
.Sp
For example:
.nf
@@ -304,16 +292,11 @@ and allocation profiling.
.Sp
.nf
mono --profile=default:stat,alloc,file=prof.out program.exe
mono --profile=default:stat,alloc program.exe
.fi
Will do sample statistical profiling and allocation profiling on
program.exe. The profile data is put in prof.out.
.Sp
Note that the statistical profiler has a very low overhead and should
be the preferred profiler to use (for better output use the full path
to the mono binary when running and make sure you have installed the
addr2line utility that comes from the binutils package).
program.exe.
.SH PROFILERS
There are a number of external profilers that have been developed for
Mono, we will update this section to contain the profilers.
@@ -487,11 +470,7 @@ to disable the use of a C# customized
serializer, or an integer that is the minimum number of uses before
the runtime will produce a custom serializer (0 will produce a
custom serializer on the first access, 50 will produce a serializer on
the 50th use). Mono will fallback to an interpreted serializer if the
serializer generation somehow fails. This behavior can be disabled
by setting the option
.B `nofallback'
(for example: MONO_XMLSERIALIZER_THS=0,nofallback).
the 50th use).
.SH ENVIRONMENT VARIABLES
.TP
.I "GC_DONT_GC"
@@ -503,6 +482,11 @@ If set, this variable will instruct Mono to ahead-of-time compile new
assemblies on demand and store the result into a cache in
~/.mono/aot-cache.
.TP
.I "MONO_ASPNET_NODELETE"
If set to any value, temporary source files generated by ASP.NET support
classes will not be removed. They will be kept in the user's temporary
directory.
.TP
.I "MONO_CFG_DIR"
If set, this variable overrides the default system configuration directory
($PREFIX/etc). It's used to locate machine.config file.
@@ -544,13 +528,6 @@ If set, tells mono NOT to attempt using native asynchronous I/O services. In
that case, a default select/poll implementation is used. Currently only epoll()
is supported.
.TP
.I "MONO_DISABLE_MANAGED_COLLATION"
If this environment variable is `yes', the runtime uses unmanaged
collation (which actually means no culture-sensitive collation). It
internally disables managed collation functionality invoked via the
members of System.Globalization.CompareInfo class. Collation is
enabled by default.
.TP
.I "MONO_EGD_SOCKET"
For platforms that do not otherwise have a way of obtaining random bytes
this can be set to the name of a file system socket on which an egd or
@@ -582,6 +559,21 @@ unix). MONO_GAC_PREFIX should point to the top directory of a prefixed
install. Or to the directory provided in the gacutil /gacdir command. Example:
.B /home/username/.mono:/usr/local/mono/
.TP
.I "MONO_LOG_LEVEL"
The logging level, possible values are `error', `critical', `warning',
`message', `info' and `debug'. See the DEBUGGING section for more
details.
.TP
.I "MONO_LOG_MASK"
Controls the domain of the Mono runtime that logging will apply to.
If set, the log mask is changed to the set value. Possible values are
"asm" (assembly loader), "type", "dll" (native library loader), "gc"
(garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all".
The default value is "all". Changing the mask value allows you to display only
messages for a certain component. You can use multiple masks by comma
separating them. For example to see config file messages and assembly loader
messages set you mask to "asm,cfg".
.TP
.I "MONO_MANAGED_WATCHER"
If set to any value, System.IO.FileSystemWatcher will use the default
managed implementation (slow). If unset, mono will try to use FAM under
@@ -631,10 +623,6 @@ Mono typically uses the hostname to create the files that are used to
share state across multiple Mono processes. This is done to support
home directories that might be shared over the network.
.TP
.I "MONO_STRICT_IO_EMULATION"
If set, extra checks are made during IO operations. Currently, this
includes only advisory locks around file writes.
.TP
.I "MONO_THEME"
The name of the theme to be used by Windows.Forms. Available themes today
include "clearlooks", "nice" and "win32".
@@ -646,35 +634,6 @@ The maximum number of threads in the general threadpool will be
20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
variable is 5.
.TP
.I "MONO_XMLSERIALIZER_THS"
Controls the threshold for the XmlSerializer to produce a custom
serializer for a given class instead of using the Reflection-based
interpreter. The possible values are `no' to disable the use of a
custom serializer or a number to indicate when the XmlSerializer
should start serializing. The default value is 50, which means that
the a custom serializer will be produced on the 50th use.
.SH ENVIRONMENT VARIABLES FOR DEBUGGING
.TP
.I "MONO_ASPNET_NODELETE"
If set to any value, temporary source files generated by ASP.NET support
classes will not be removed. They will be kept in the user's temporary
directory.
.TP
.I "MONO_LOG_LEVEL"
The logging level, possible values are `error', `critical', `warning',
`message', `info' and `debug'. See the DEBUGGING section for more
details.
.TP
.I "MONO_LOG_MASK"
Controls the domain of the Mono runtime that logging will apply to.
If set, the log mask is changed to the set value. Possible values are
"asm" (assembly loader), "type", "dll" (native library loader), "gc"
(garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all".
The default value is "all". Changing the mask value allows you to display only
messages for a certain component. You can use multiple masks by comma
separating them. For example to see config file messages and assembly loader
messages set you mask to "asm,cfg".
.TP
.I "MONO_TRACE"
Used for runtime tracing of method calls. The format of the comma separated
trace options is:
@@ -700,16 +659,24 @@ be used when writing messages like this: Console.Error:MyProgramName.
See the System.Diagnostics.DefaultTraceListener documentation for more
information.
.TP
.I "MONO_XEXCEPTIONS"
This throws an exception when a X11 error is encountered; by default a
message is displayed but execution continues
.I "MONO_DISABLE_MANAGED_COLLATION"
If this environment variable is `yes', the runtime uses unmanaged
collation (which actually means no culture-sensitive collation). It
internally disables managed collation functionality invoked via the
members of System.Globalization.CompareInfo class. Collation is
enabled by default.
.TP
.I "MONO_XSYNC"
This is used in the System.Windows.Forms implementation when running
with the X11 backend. This is used to debug problems in Windows.Forms
as it forces all of the commands send to X11 server to be done
synchronously. The default mode of operation is asynchronous which
makes it hard to isolate the root of certain problems.
.I "MONO_XMLSERIALIZER_THS"
Controls the threshold for the XmlSerializer to produce a custom
serializer for a given class instead of using the Reflection-based
interpreter. The possible values are `no' to disable the use of a
custom serializer or a number to indicate when the XmlSerializer
should start serializing. The default value is 50, which means that
the a custom serializer will be produced on the 50th use.
.TP
.I "MONO_STRICT_IO_EMULATION"
If set, extra checks are made during IO operations. Currently, this
includes only advisory locks around file writes.
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
-4
View File
@@ -1,7 +1,3 @@
2006-04-11 Raja R Harinath <[email protected]>
* Makefile (SUBDIRS): Remove tools/resgen.
2005-11-21 Raja R Harinath <[email protected]>
* Makefile (net_2_0_bootstrap_SUBDIRS): Add ilasm.
+2 -2
View File
@@ -1,6 +1,6 @@
thisdir := .
SUBDIRS := build jay mcs class mbas nunit20 ilasm tools tests errors docs
SUBDIRS := build jay mcs tools/resgen class mbas nunit20 ilasm tools tests errors docs
DIST_ONLY_SUBDIRS := gmcs
basic_SUBDIRS := build jay mcs class
@@ -31,7 +31,7 @@ default_centum_tests := \
class/System.XML \
class/System.Data
net_2_0_centum_tests := $(centum_tests) #class/Mono.C5
net_2_0_centum_tests := $(centum_tests) class/Mono.C5
ifdef ONLY_CENTUM_TESTS
TEST_SUBDIRS := $($(PROFILE)_centum_tests)
-8
View File
@@ -1,8 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyVersion(Consts.MonoVersion)]
[assembly: AssemblyTitle ("Mono VB.NET Compiler")]
[assembly: AssemblyDescription ("Mono VB.NET Compiler with Generics")]
[assembly: AssemblyCopyright ("2001, 2002, 2003 Ximian, Inc.")]
[assembly: AssemblyCompany ("Ximian, Inc.")]
-20333
View File
File diff suppressed because it is too large. Load diff
-406
View File
@@ -1,406 +0,0 @@
//
// CryptoConvert.cs - Crypto Convertion Routines
//
// Author:
// Sebastien Pouliot <[email protected]>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
// (C) 2004 Novell (http://www.novell.com)
//
using System;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
namespace Mono.Security.Cryptography {
#if INSIDE_CORLIB
internal
#else
public
#endif
sealed class CryptoConvert {
private CryptoConvert ()
{
}
static private int ToInt32LE (byte [] bytes, int offset)
{
return (bytes [offset+3] << 24) | (bytes [offset+2] << 16) | (bytes [offset+1] << 8) | bytes [offset];
}
static private uint ToUInt32LE (byte [] bytes, int offset)
{
return (uint)((bytes [offset+3] << 24) | (bytes [offset+2] << 16) | (bytes [offset+1] << 8) | bytes [offset]);
}
static private byte [] GetBytesLE (int val)
{
return new byte [] {
(byte) (val & 0xff),
(byte) ((val >> 8) & 0xff),
(byte) ((val >> 16) & 0xff),
(byte) ((val >> 24) & 0xff)
};
}
static private byte[] Trim (byte[] array)
{
for (int i=0; i < array.Length; i++) {
if (array [i] != 0x00) {
byte[] result = new byte [array.Length - i];
Buffer.BlockCopy (array, i, result, 0, result.Length);
return result;
}
}
return null;
}
// convert the key from PRIVATEKEYBLOB to RSA
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/Security/private_key_blobs.asp
// e.g. SNK files, PVK files
static public RSA FromCapiPrivateKeyBlob (byte[] blob)
{
return FromCapiPrivateKeyBlob (blob, 0);
}
static public RSA FromCapiPrivateKeyBlob (byte[] blob, int offset)
{
if (blob == null)
throw new ArgumentNullException ("blob");
if (offset >= blob.Length)
throw new ArgumentException ("blob is too small.");
try {
if ((blob [offset] != 0x07) || // PRIVATEKEYBLOB (0x07)
(blob [offset+1] != 0x02) || // Version (0x02)
(blob [offset+2] != 0x00) || // Reserved (word)
(blob [offset+3] != 0x00) ||
(ToUInt32LE (blob, offset+8) != 0x32415352)) // DWORD magic = RSA2
throw new CryptographicException ("Invalid blob header");
// ALGID (CALG_RSA_SIGN, CALG_RSA_KEYX, ...)
// int algId = ToInt32LE (blob, offset+4);
// DWORD bitlen
int bitLen = ToInt32LE (blob, offset+12);
// DWORD public exponent
RSAParameters rsap = new RSAParameters ();
byte[] exp = new byte [4];
Buffer.BlockCopy (blob, offset+16, exp, 0, 4);
Array.Reverse (exp);
rsap.Exponent = Trim (exp);
int pos = offset+20;
// BYTE modulus[rsapubkey.bitlen/8];
int byteLen = (bitLen >> 3);
rsap.Modulus = new byte [byteLen];
Buffer.BlockCopy (blob, pos, rsap.Modulus, 0, byteLen);
Array.Reverse (rsap.Modulus);
pos += byteLen;
// BYTE prime1[rsapubkey.bitlen/16];
int byteHalfLen = (byteLen >> 1);
rsap.P = new byte [byteHalfLen];
Buffer.BlockCopy (blob, pos, rsap.P, 0, byteHalfLen);
Array.Reverse (rsap.P);
pos += byteHalfLen;
// BYTE prime2[rsapubkey.bitlen/16];
rsap.Q = new byte [byteHalfLen];
Buffer.BlockCopy (blob, pos, rsap.Q, 0, byteHalfLen);
Array.Reverse (rsap.Q);
pos += byteHalfLen;
// BYTE exponent1[rsapubkey.bitlen/16];
rsap.DP = new byte [byteHalfLen];
Buffer.BlockCopy (blob, pos, rsap.DP, 0, byteHalfLen);
Array.Reverse (rsap.DP);
pos += byteHalfLen;
// BYTE exponent2[rsapubkey.bitlen/16];
rsap.DQ = new byte [byteHalfLen];
Buffer.BlockCopy (blob, pos, rsap.DQ, 0, byteHalfLen);
Array.Reverse (rsap.DQ);
pos += byteHalfLen;
// BYTE coefficient[rsapubkey.bitlen/16];
rsap.InverseQ = new byte [byteHalfLen];
Buffer.BlockCopy (blob, pos, rsap.InverseQ, 0, byteHalfLen);
Array.Reverse (rsap.InverseQ);
pos += byteHalfLen;
// ok, this is hackish but CryptoAPI support it so...
// note: only works because CRT is used by default
// http://bugzilla.ximian.com/show_bug.cgi?id=57941
rsap.D = new byte [byteLen]; // must be allocated
if (pos + byteLen + offset <= blob.Length) {
// BYTE privateExponent[rsapubkey.bitlen/8];
Buffer.BlockCopy (blob, pos, rsap.D, 0, byteLen);
Array.Reverse (rsap.D);
}
RSA rsa = (RSA)RSA.Create ();
rsa.ImportParameters (rsap);
return rsa;
}
catch (Exception e) {
throw new CryptographicException ("Invalid blob.", e);
}
}
static public byte[] ToCapiPrivateKeyBlob (RSA rsa)
{
RSAParameters p = rsa.ExportParameters (true);
int keyLength = p.Modulus.Length; // in bytes
byte[] blob = new byte [20 + (keyLength << 2) + (keyLength >> 1)];
blob [0] = 0x07; // Type - PRIVATEKEYBLOB (0x07)
blob [1] = 0x02; // Version - Always CUR_BLOB_VERSION (0x02)
// [2], [3] // RESERVED - Always 0
blob [5] = 0x24; // ALGID - Always 00 24 00 00 (for CALG_RSA_SIGN)
blob [8] = 0x52; // Magic - RSA2 (ASCII in hex)
blob [9] = 0x53;
blob [10] = 0x41;
blob [11] = 0x32;
byte[] bitlen = GetBytesLE (keyLength << 3);
blob [12] = bitlen [0]; // bitlen
blob [13] = bitlen [1];
blob [14] = bitlen [2];
blob [15] = bitlen [3];
// public exponent (DWORD)
int pos = 16;
int n = p.Exponent.Length;
while (n > 0)
blob [pos++] = p.Exponent [--n];
// modulus
pos = 20;
byte[] part = p.Modulus;
int len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
// private key
part = p.P;
len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
part = p.Q;
len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
part = p.DP;
len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
part = p.DQ;
len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
part = p.InverseQ;
len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
part = p.D;
len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
return blob;
}
static public RSA FromCapiPublicKeyBlob (byte[] blob)
{
return FromCapiPublicKeyBlob (blob, 0);
}
static public RSA FromCapiPublicKeyBlob (byte[] blob, int offset)
{
if (blob == null)
throw new ArgumentNullException ("blob");
if (offset >= blob.Length)
throw new ArgumentException ("blob is too small.");
try {
if ((blob [offset] != 0x06) || // PUBLICKEYBLOB (0x06)
(blob [offset+1] != 0x02) || // Version (0x02)
(blob [offset+2] != 0x00) || // Reserved (word)
(blob [offset+3] != 0x00) ||
(ToUInt32LE (blob, offset+8) != 0x31415352)) // DWORD magic = RSA1
throw new CryptographicException ("Invalid blob header");
// ALGID (CALG_RSA_SIGN, CALG_RSA_KEYX, ...)
// int algId = ToInt32LE (blob, offset+4);
// DWORD bitlen
int bitLen = ToInt32LE (blob, offset+12);
// DWORD public exponent
RSAParameters rsap = new RSAParameters ();
rsap.Exponent = new byte [3];
rsap.Exponent [0] = blob [offset+18];
rsap.Exponent [1] = blob [offset+17];
rsap.Exponent [2] = blob [offset+16];
int pos = offset+20;
// BYTE modulus[rsapubkey.bitlen/8];
int byteLen = (bitLen >> 3);
rsap.Modulus = new byte [byteLen];
Buffer.BlockCopy (blob, pos, rsap.Modulus, 0, byteLen);
Array.Reverse (rsap.Modulus);
RSA rsa = (RSA)RSA.Create ();
rsa.ImportParameters (rsap);
return rsa;
}
catch (Exception e) {
throw new CryptographicException ("Invalid blob.", e);
}
}
static public byte[] ToCapiPublicKeyBlob (RSA rsa)
{
RSAParameters p = rsa.ExportParameters (false);
int keyLength = p.Modulus.Length; // in bytes
byte[] blob = new byte [20 + keyLength];
blob [0] = 0x06; // Type - PUBLICKEYBLOB (0x06)
blob [1] = 0x02; // Version - Always CUR_BLOB_VERSION (0x02)
// [2], [3] // RESERVED - Always 0
blob [5] = 0x24; // ALGID - Always 00 24 00 00 (for CALG_RSA_SIGN)
blob [8] = 0x52; // Magic - RSA1 (ASCII in hex)
blob [9] = 0x53;
blob [10] = 0x41;
blob [11] = 0x31;
byte[] bitlen = GetBytesLE (keyLength << 3);
blob [12] = bitlen [0]; // bitlen
blob [13] = bitlen [1];
blob [14] = bitlen [2];
blob [15] = bitlen [3];
// public exponent (DWORD)
int pos = 16;
int n = p.Exponent.Length;
while (n > 0)
blob [pos++] = p.Exponent [--n];
// modulus
pos = 20;
byte[] part = p.Modulus;
int len = part.Length;
Array.Reverse (part, 0, len);
Buffer.BlockCopy (part, 0, blob, pos, len);
pos += len;
return blob;
}
// PRIVATEKEYBLOB
// PUBLICKEYBLOB
static public RSA FromCapiKeyBlob (byte[] blob)
{
return FromCapiKeyBlob (blob, 0);
}
static public RSA FromCapiKeyBlob (byte[] blob, int offset)
{
if (blob == null)
throw new ArgumentNullException ("blob");
if (offset >= blob.Length)
throw new ArgumentException ("blob is too small.");
switch (blob [offset]) {
case 0x00:
// this could be a public key inside an header
// like "sn -e" would produce
if (blob [offset + 12] == 0x06) {
return FromCapiPublicKeyBlob (blob, offset + 12);
}
break;
case 0x06:
return FromCapiPublicKeyBlob (blob, offset);
case 0x07:
return FromCapiPrivateKeyBlob (blob, offset);
}
throw new CryptographicException ("Unknown blob format.");
}
static public byte[] ToCapiKeyBlob (AsymmetricAlgorithm keypair, bool includePrivateKey)
{
if (keypair == null)
throw new ArgumentNullException ("keypair");
// check between RSA and DSA (and potentially others like DH)
if (keypair is RSA)
return ToCapiKeyBlob ((RSA)keypair, includePrivateKey);
else
return null; // TODO
}
static public byte[] ToCapiKeyBlob (RSA rsa, bool includePrivateKey)
{
if (rsa == null)
throw new ArgumentNullException ("rsa");
rsa.ExportParameters (includePrivateKey);
if (includePrivateKey)
return ToCapiPrivateKeyBlob (rsa);
else
return ToCapiPublicKeyBlob (rsa);
}
static public string ToHex (byte[] input)
{
if (input == null)
return null;
StringBuilder sb = new StringBuilder (input.Length * 2);
foreach (byte b in input) {
sb.Append (b.ToString ("X2", CultureInfo.InvariantCulture));
}
return sb.ToString ();
}
static private byte FromHexChar (char c)
{
if ((c >= 'a') && (c <= 'f'))
return (byte) (c - 'a' + 10);
if ((c >= 'A') && (c <= 'F'))
return (byte) (c - 'A' + 10);
if ((c >= '0') && (c <= '9'))
return (byte) (c - '0');
throw new ArgumentException ("invalid hex char");
}
static public byte[] FromHex (string hex)
{
if (hex == null)
return null;
if ((hex.Length & 0x1) == 0x1)
throw new ArgumentException ("Length must be a multiple of 2");
byte[] result = new byte [hex.Length >> 1];
int n = 0;
int i = 0;
while (n < result.Length) {
result [n] = (byte) (FromHexChar (hex [i++]) << 4);
result [n++] += FromHexChar (hex [i++]);
}
return result;
}
}
}
-37
View File
@@ -1,37 +0,0 @@
#
# This makefile needs work, currently we overwrite the value of `bmcs.exe',
# the reason is that we need this to be compiled with gmcs, so it uses the
# .NET 2.0 profile.
#
thisdir := bmcs
SUBDIRS :=
include ../build/rules.make
#uncomment to enable some debug stuff
#DEBUG_FLAGS=/define:MCS_DEBUG
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/mcs.exe $(DEBUG_FLAGS)
BUILT_SOURCES = mb-parser.cs
EXTRA_DISTFILES = mb-parser.jay
PROGRAM_COMPILE = $(BOOT_COMPILE)
CLEAN_FILES = y.output
PROGRAM = bmcs.exe
mb-parser.cs: mb-parser.jay $(topdir)/jay/skeleton.cs
$(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
include ../build/executable.make
bmcs.exe: mb-parser.cs
gmcs -d:NET_1_1 -d:ONLY_1_1 -debug /target:exe /out:bmcs.exe /r:Microsoft.VisualBasic.dll mb-parser.cs @bmcs.exe.sources -nowarn:219 -nowarn:162
winstall: all
cp bmcs.exe $(prefix)/lib/mono/2.0/
diffus:
diff --exclude='.svn' --exclude='*-parser.*' --exclude='*-tokenizer.cs' -ruN ../gmcs ../bmcs
-22
View File
@@ -1,22 +0,0 @@
* This is BMCS
Last merge to GMCS: 42056
BMCS is a new fork of the generics compiler from revision
38733 (11th of January 2005).
This new compiler is based on the changes that Jambunathan did
to mcs from November 30th, 2004 to integrate the existing mbas
compiler with a more recent mcs.
We have ported those changes to use `gmcs' so that we get
support for generics into our VB compiler eventually.
Work toward integrating the improvements from mbas will go here.
* LICENSING
Notice that the compiler might eventually need to go into the
class libraries. We request that contributors grant us permission
to relicense the code under the MIT X11 license if we have to.
File diff suppressed because it is too large. Load diff
-632
View File
@@ -1,632 +0,0 @@
//
// assign.cs: Assignments.
//
// Author:
// Miguel de Icaza ([email protected])
// Martin Baulig ([email protected])
//
// (C) 2001, 2002, 2003 Ximian, Inc.
// (C) 2004 Novell, Inc
//
using System;
using System.Reflection;
using System.Reflection.Emit;
namespace Mono.CSharp {
/// <summary>
/// This interface is implemented by expressions that can be assigned to.
/// </summary>
/// <remarks>
/// This interface is implemented by Expressions whose values can not
/// store the result on the top of the stack.
///
/// Expressions implementing this (Properties, Indexers and Arrays) would
/// perform an assignment of the Expression "source" into its final
/// location.
///
/// No values on the top of the stack are expected to be left by
/// invoking this method.
/// </remarks>
public interface IAssignMethod {
//
// This is an extra version of Emit. If leave_copy is `true'
// A copy of the expression will be left on the stack at the
// end of the code generated for EmitAssign
//
void Emit (EmitContext ec, bool leave_copy);
//
// This method does the assignment
// `source' will be stored into the location specified by `this'
// if `leave_copy' is true, a copy of `source' will be left on the stack
// if `prepare_for_load' is true, when `source' is emitted, there will
// be data on the stack that it can use to compuatate its value. This is
// for expressions like a [f ()] ++, where you can't call `f ()' twice.
//
void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load);
/*
For simple assignments, this interface is very simple, EmitAssign is called with source
as the source expression and leave_copy and prepare_for_load false.
For compound assignments it gets complicated.
EmitAssign will be called as before, however, prepare_for_load will be
true. The @source expression will contain an expression
which calls Emit. So, the calls look like:
this.EmitAssign (ec, source, false, true) ->
source.Emit (ec); ->
[...] ->
this.Emit (ec, false); ->
end this.Emit (ec, false); ->
end [...]
end source.Emit (ec);
end this.EmitAssign (ec, source, false, true)
When prepare_for_load is true, EmitAssign emits a `token' on the stack that
Emit will use for its state.
Let's take FieldExpr as an example. assume we are emitting f ().y += 1;
Here is the call tree again. This time, each call is annotated with the IL
it produces:
this.EmitAssign (ec, source, false, true)
call f
dup
Binary.Emit ()
this.Emit (ec, false);
ldfld y
end this.Emit (ec, false);
IntConstant.Emit ()
ldc.i4.1
end IntConstant.Emit
add
end Binary.Emit ()
stfld
end this.EmitAssign (ec, source, false, true)
Observe two things:
1) EmitAssign left a token on the stack. It was the result of f ().
2) This token was used by Emit
leave_copy (in both EmitAssign and Emit) tells the compiler to leave a copy
of the expression at that point in evaluation. This is used for pre/post inc/dec
and for a = x += y. Let's do the above example with leave_copy true in EmitAssign
this.EmitAssign (ec, source, true, true)
call f
dup
Binary.Emit ()
this.Emit (ec, false);
ldfld y
end this.Emit (ec, false);
IntConstant.Emit ()
ldc.i4.1
end IntConstant.Emit
add
end Binary.Emit ()
dup
stloc temp
stfld
ldloc temp
end this.EmitAssign (ec, source, true, true)
And with it true in Emit
this.EmitAssign (ec, source, false, true)
call f
dup
Binary.Emit ()
this.Emit (ec, true);
ldfld y
dup
stloc temp
end this.Emit (ec, true);
IntConstant.Emit ()
ldc.i4.1
end IntConstant.Emit
add
end Binary.Emit ()
stfld
ldloc temp
end this.EmitAssign (ec, source, false, true)
Note that these two examples are what happens for ++x and x++, respectively.
*/
}
/// <summary>
/// An Expression to hold a temporary value.
/// </summary>
/// <remarks>
/// The LocalTemporary class is used to hold temporary values of a given
/// type to "simulate" the expression semantics on property and indexer
/// access whose return values are void.
///
/// The local temporary is used to alter the normal flow of code generation
/// basically it creates a local variable, and its emit instruction generates
/// code to access this value, return its address or save its value.
///
/// If `is_address' is true, then the value that we store is the address to the
/// real value, and not the value itself.
///
/// This is needed for a value type, because otherwise you just end up making a
/// copy of the value on the stack and modifying it. You really need a pointer
/// to the origional value so that you can modify it in that location. This
/// Does not happen with a class because a class is a pointer -- so you always
/// get the indirection.
///
/// The `is_address' stuff is really just a hack. We need to come up with a better
/// way to handle it.
/// </remarks>
public class LocalTemporary : Expression, IMemoryLocation {
LocalBuilder builder;
bool is_address;
public LocalTemporary (EmitContext ec, Type t) : this (ec, t, false) {}
public LocalTemporary (EmitContext ec, Type t, bool is_address)
{
type = t;
eclass = ExprClass.Value;
loc = Location.Null;
builder = ec.GetTemporaryLocal (is_address ? TypeManager.GetReferenceType (t): t);
this.is_address = is_address;
}
public LocalTemporary (LocalBuilder b, Type t)
{
type = t;
eclass = ExprClass.Value;
loc = Location.Null;
builder = b;
}
public void Release (EmitContext ec)
{
ec.FreeTemporaryLocal (builder, type);
builder = null;
}
public override Expression DoResolve (EmitContext ec)
{
return this;
}
public override void Emit (EmitContext ec)
{
ILGenerator ig = ec.ig;
ig.Emit (OpCodes.Ldloc, builder);
// we need to copy from the pointer
if (is_address)
LoadFromPtr (ig, type);
}
// NB: if you have `is_address' on the stack there must
// be a managed pointer. Otherwise, it is the type from
// the ctor.
public void Store (EmitContext ec)
{
ILGenerator ig = ec.ig;
ig.Emit (OpCodes.Stloc, builder);
}
public void AddressOf (EmitContext ec, AddressOp mode)
{
// if is_address, than this is just the address anyways,
// so we just return this.
ILGenerator ig = ec.ig;
if (is_address)
ig.Emit (OpCodes.Ldloc, builder);
else
ig.Emit (OpCodes.Ldloca, builder);
}
public bool PointsToAddress {
get {
return is_address;
}
}
}
/// <summary>
/// The Assign node takes care of assigning the value of source into
/// the expression represented by target.
/// </summary>
public class Assign : ExpressionStatement {
protected Expression target, source, real_source;
protected LocalTemporary temp = null, real_temp = null;
protected Assign embedded = null;
protected bool is_embedded = false;
protected bool must_free_temp = false;
public Assign (Expression target, Expression source, Location l)
{
this.target = target;
this.source = this.real_source = source;
this.loc = l;
}
protected Assign (Assign embedded, Location l)
: this (embedded.target, embedded.source, l)
{
this.is_embedded = true;
}
protected virtual Assign GetEmbeddedAssign (Location loc)
{
return new Assign (this, loc);
}
public Expression Target {
get {
return target;
}
set {
target = value;
}
}
public Expression Source {
get {
return source;
}
set {
source = value;
}
}
public static void error70 (EventInfo ei, Location l)
{
Report.Error (70, l, "The event '" + ei.Name +
"' can only appear on the left-side of a += or -= (except when" +
" used from within the type '" + ei.DeclaringType + "')");
}
//
// Will return either `this' or an instance of `New'.
//
public override Expression DoResolve (EmitContext ec)
{
// Create an embedded assignment if our source is an assignment.
if (source is Assign)
source = embedded = ((Assign) source).GetEmbeddedAssign (loc);
real_source = source = source.Resolve (ec);
if (source == null)
return null;
//
// This is used in an embedded assignment.
// As an example, consider the statement "A = X = Y = Z".
//
if (is_embedded && !(source is Constant)) {
// If this is the innermost assignment (the "Y = Z" in our example),
// create a new temporary local, otherwise inherit that variable
// from our child (the "X = (Y = Z)" inherits the local from the
// "Y = Z" assignment).
if (embedded == null) {
if (this is CompoundAssign)
real_temp = temp = new LocalTemporary (ec, target.Type);
else
real_temp = temp = new LocalTemporary (ec, source.Type);
} else
temp = embedded.temp;
// Set the source to the new temporary variable.
// This means that the following target.ResolveLValue () will tell
// the target to read it's source value from that variable.
source = temp;
}
// If we have an embedded assignment, use the embedded assignment's temporary
// local variable as source.
if (embedded != null)
source = (embedded.temp != null) ? embedded.temp : embedded.source;
target = target.ResolveLValue (ec, source);
if (target == null)
return null;
Type target_type = target.Type;
Type source_type = real_source.Type;
// If we're an embedded assignment, our parent will reuse our source as its
// source, it won't read from our target.
if (is_embedded)
type = source_type;
else
type = target_type;
eclass = ExprClass.Value;
if (target is EventExpr) {
EventInfo ei = ((EventExpr) target).EventInfo;
Expression ml = MemberLookup (
ec, ec.ContainerType, ei.Name,
MemberTypes.Event, AllBindingFlags | BindingFlags.DeclaredOnly, loc);
if (ml == null) {
//
// If this is the case, then the Event does not belong
// to this Type and so, according to the spec
// is allowed to only appear on the left hand of
// the += and -= operators
//
// Note that target will not appear as an EventExpr
// in the case it is being referenced within the same type container;
// it will appear as a FieldExpr in that case.
//
if (!(source is BinaryDelegate)) {
error70 (ei, loc);
return null;
}
}
}
FieldExpr field_exp = target as FieldExpr;
if (field_exp != null && field_exp.DeclaringType.IsValueType && !ec.IsConstructor && !ec.IsFieldInitializer) {
field_exp = field_exp.InstanceExpression as FieldExpr;
if (field_exp != null && field_exp.FieldInfo.IsInitOnly) {
if (field_exp.IsStatic) {
Report.Error (1650, loc, "Members of static readonly field '{0}' cannot be assigned to " +
"(except in a static constructor or a variable initializer)", TypeManager.GetFullNameSignature (field_exp.FieldInfo));
} else {
Report.Error (1648, loc, "Members of readonly field '{0}' cannot be assigned to " +
"(except in a constructor or a variable initializer)", TypeManager.GetFullNameSignature (field_exp.FieldInfo));
}
return null;
}
}
if (!(target is IAssignMethod) && (target.eclass != ExprClass.EventAccess)) {
Report.Error (131, loc,
"Left hand of an assignment must be a variable, " +
"a property or an indexer");
return null;
}
if ((source.eclass == ExprClass.Type) && (source is TypeExpr)) {
source.Error_UnexpectedKind ("variable or value", loc);
return null;
} else if ((RootContext.Version == LanguageVersion.ISO_1) &&
(source is MethodGroupExpr)){
((MethodGroupExpr) source).ReportUsageError ();
return null;
}
if (target_type == source_type){
if (source is New && target_type.IsValueType &&
(target.eclass != ExprClass.IndexerAccess) && (target.eclass != ExprClass.PropertyAccess)){
New n = (New) source;
if (n.SetValueTypeVariable (target))
return n;
else
return null;
}
return this;
}
//
// If this assignemnt/operator was part of a compound binary
// operator, then we allow an explicit conversion, as detailed
// in the spec.
//
if (this is CompoundAssign){
CompoundAssign a = (CompoundAssign) this;
Binary b = source as Binary;
if (b != null){
//
// 1. if the source is explicitly convertible to the
// target_type
//
source = Convert.WideningAndNarrowingConversion (ec, source, target_type, loc);
if (source == null){
Convert.Error_CannotWideningConversion (loc, source_type, target_type);
return null;
}
//
// 2. and the original right side is implicitly convertible to
// the type of target
//
if (Convert.WideningStandardConversionExists (ec, a.original_source, target_type))
return this;
//
// In the spec 2.4 they added: or if type of the target is int
// and the operator is a shift operator...
//
if (source_type == TypeManager.int32_type &&
(b.Oper == Binary.Operator.LeftShift || b.Oper == Binary.Operator.RightShift))
return this;
Convert.Error_CannotWideningConversion (loc, a.original_source.Type, target_type);
return null;
}
}
source = Convert.ImplicitVBConversionRequired (ec, source, target_type, loc);
if (source == null)
return null;
// If we're an embedded assignment, we need to create a new temporary variable
// for the converted value. Our parent will use this new variable as its source.
// The same applies when we have an embedded assignment - in this case, we need
// to convert our embedded assignment's temporary local variable to the correct
// type and store it in a new temporary local.
if (is_embedded || embedded != null) {
type = target_type;
temp = new LocalTemporary (ec, type);
must_free_temp = true;
}
return this;
}
Expression EmitEmbedded (EmitContext ec)
{
// Emit an embedded assignment.
if (real_temp != null) {
// If we're the innermost assignment, `real_source' is the right-hand
// expression which gets assigned to all the variables left of it.
// Emit this expression and store its result in real_temp.
real_source.Emit (ec);
real_temp.Store (ec);
}
if (embedded != null)
embedded.EmitEmbedded (ec);
// This happens when we've done a type conversion, in this case source will be
// the expression which does the type conversion from real_temp.
// So emit it and store the result in temp; this is the var which will be read
// by our parent.
if (temp != real_temp) {
source.Emit (ec);
temp.Store (ec);
}
Expression temp_source = (temp != null) ? temp : source;
((IAssignMethod) target).EmitAssign (ec, temp_source, false, false);
return temp_source;
}
void ReleaseEmbedded (EmitContext ec)
{
if (embedded != null)
embedded.ReleaseEmbedded (ec);
if (real_temp != null)
real_temp.Release (ec);
if (must_free_temp)
temp.Release (ec);
}
void Emit (EmitContext ec, bool is_statement)
{
if (target is EventExpr) {
((EventExpr) target).EmitAddOrRemove (ec, source);
return;
}
IAssignMethod am = (IAssignMethod) target;
Expression temp_source;
if (embedded != null) {
temp_source = embedded.EmitEmbedded (ec);
if (temp != null) {
source.Emit (ec);
temp.Store (ec);
temp_source = temp;
}
} else
temp_source = source;
am.EmitAssign (ec, temp_source, !is_statement, this is CompoundAssign);
if (embedded != null) {
if (temp != null)
temp.Release (ec);
embedded.ReleaseEmbedded (ec);
}
}
public override void Emit (EmitContext ec)
{
Emit (ec, false);
}
public override void EmitStatement (EmitContext ec)
{
Emit (ec, true);
}
}
//
// This class is used for compound assignments.
//
class CompoundAssign : Assign {
Binary.Operator op;
public Expression original_source;
public CompoundAssign (Binary.Operator op, Expression target, Expression source, Location l)
: base (target, source, l)
{
original_source = source;
this.op = op;
}
protected CompoundAssign (CompoundAssign embedded, Location l)
: this (embedded.op, embedded.target, embedded.source, l)
{
this.is_embedded = true;
}
protected override Assign GetEmbeddedAssign (Location loc)
{
return new CompoundAssign (this, loc);
}
public Expression ResolveSource (EmitContext ec)
{
return original_source.Resolve (ec);
}
public override Expression DoResolve (EmitContext ec)
{
original_source = original_source.Resolve (ec);
if (original_source == null)
return null;
target = target.Resolve (ec);
if (target == null)
return null;
//
// Only now we can decouple the original source/target
// into a tree, to guarantee that we do not have side
// effects.
//
source = new Binary (op, target, original_source, loc);
return base.DoResolve (ec);
}
}
}
File diff suppressed because it is too large. Load diff
-14
View File
@@ -1,14 +0,0 @@
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="compilerLogListener" type="System.Diagnostics.TextWriterTraceListener,System"
initializeData="mcs.log" />
<remove type="System.Diagnostics.DefaultTraceListener,System"/>
</listeners>
</trace>
</system.diagnostics>
</configuration>
-40
View File
@@ -1,40 +0,0 @@
AssemblyInfo.cs
anonymous.cs
assign.cs
attribute.cs
driver.cs
mb-tokenizer.cs
cfold.cs
class.cs
codegen.cs
const.cs
constant.cs
convert.cs
decl.cs
delegate.cs
doc.cs
enum.cs
ecore.cs
expression.cs
flowanalysis.cs
generic.cs
iterators.cs
literal.cs
location.cs
modifiers.cs
namespace.cs
parameter.cs
pending.cs
report.cs
rootcontext.cs
statement.cs
support.cs
typemanager.cs
symbolwriter.cs
tree.cs
module.cs
../class/corlib/Mono.Security.Cryptography/CryptoConvert.cs
../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
../class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
../build/common/Consts.cs
-1246
View File
File diff suppressed because it is too large. Load diff
-8091
View File
File diff suppressed because it is too large. Load diff
-1377
View File
File diff suppressed because it is too large. Load diff
-321
View File
@@ -1,321 +0,0 @@
//
// const.cs: Constant declarations.
//
// Author:
// Miguel de Icaza ([email protected])
// Marek Safar ([email protected])
//
// (C) 2001 Ximian, Inc.
//
//
//
// This is needed because the following situation arises:
//
// The FieldBuilder is declared with the real type for an enumeration
//
// When we attempt to set the value for the constant, the FieldBuilder.SetConstant
// function aborts because it requires its argument to be of the same type
//
namespace Mono.CSharp {
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Collections;
public class Const : FieldMember {
public Expression Expr;
EmitContext const_ec;
bool resolved = false;
object ConstantValue = null;
bool in_transit = false;
public const int AllowedModifiers =
Modifiers.NEW |
Modifiers.PUBLIC |
Modifiers.PROTECTED |
Modifiers.INTERNAL |
Modifiers.PRIVATE;
public Const (TypeContainer parent, Expression constant_type, string name,
Expression expr, int mod_flags, Attributes attrs, Location loc)
: base (parent, constant_type, mod_flags, AllowedModifiers,
new MemberName (name), null, attrs, loc)
{
Expr = expr;
ModFlags |= Modifiers.STATIC;
}
#if DEBUG
void dump_tree (Type t)
{
Console.WriteLine ("Dumping hierarchy");
while (t != null){
Console.WriteLine (" " + t.FullName + " " +
(t.GetType ().IsEnum ? "yes" : "no"));
t = t.BaseType;
}
}
#endif
protected override bool CheckBase ()
{
// Constant.Define can be called when the parent type hasn't yet been populated
// and it's base types need not have been populated. So, we defer this check
// to the second time Define () is called on this member.
if (Parent.BaseCache == null)
return true;
return base.CheckBase ();
}
/// <summary>
/// Defines the constant in the @parent
/// </summary>
public override bool Define ()
{
// Make Define () idempotent, but ensure that the error check happens.
if (FieldBuilder != null)
return base.CheckBase ();
if (!base.Define ())
return false;
const_ec = new EmitContext (Parent, Location, null, MemberType, ModFlags);
Type ttype = MemberType;
while (ttype.IsArray)
ttype = TypeManager.GetElementType (ttype);
if (!TypeManager.IsBuiltinType(ttype) && (!ttype.IsSubclassOf(TypeManager.enum_type)) && !(Expr is NullLiteral)){
Report.Error (
-3, Location,
"Constant type is not valid (only system types are allowed)");
return false;
}
FieldAttributes field_attr = FieldAttributes.Static | Modifiers.FieldAttr (ModFlags);
// I don't know why but they emit decimal constant as InitOnly
if (ttype == TypeManager.decimal_type) {
field_attr |= FieldAttributes.InitOnly;
}
else {
field_attr |= FieldAttributes.Literal;
}
FieldBuilder = Parent.TypeBuilder.DefineField (Name, MemberType, field_attr);
TypeManager.RegisterConstant (FieldBuilder, this);
return true;
}
//
// Changes the type of the constant expression `expr' to the Type `type'
// Returns null on failure.
//
public static Constant ChangeType (Location loc, Constant expr, Type type)
{
if (type == TypeManager.object_type)
return expr;
bool fail;
// from the null type to any reference-type.
if (expr.Type == TypeManager.null_type && !type.IsValueType && !TypeManager.IsEnumType (type))
return NullLiteral.Null;
if (!Convert.WideningStandardConversionExists (Convert.ConstantEC, expr, type)){
Convert.Error_CannotWideningConversion (loc, expr.Type, type);
return null;
}
// Special-case: The 0 literal can be converted to an enum value,
// and WideningStandardConversionExists will return true in that case.
if (expr.Type == TypeManager.int32_type && TypeManager.IsEnumType (type)){
if (expr is IntLiteral && ((IntLiteral) expr).Value == 0)
return new EnumConstant (expr, type);
}
object constant_value = TypeManager.ChangeType (expr.GetValue (), type, out fail);
if (fail){
Convert.Error_CannotWideningConversion (loc, expr.Type, type);
//
// We should always catch the error before this is ever
// reached, by calling Convert.WideningStandardConversionExists
//
throw new Exception (
String.Format ("LookupConstantValue: This should never be reached {0} {1}", expr.Type, type));
}
Constant retval;
if (type == TypeManager.int32_type)
retval = new IntConstant ((int) constant_value);
else if (type == TypeManager.uint32_type)
retval = new UIntConstant ((uint) constant_value);
else if (type == TypeManager.int64_type)
retval = new LongConstant ((long) constant_value);
else if (type == TypeManager.uint64_type)
retval = new ULongConstant ((ulong) constant_value);
else if (type == TypeManager.float_type)
retval = new FloatConstant ((float) constant_value);
else if (type == TypeManager.double_type)
retval = new DoubleConstant ((double) constant_value);
else if (type == TypeManager.string_type)
retval = new StringConstant ((string) constant_value);
else if (type == TypeManager.short_type)
retval = new ShortConstant ((short) constant_value);
else if (type == TypeManager.ushort_type)
retval = new UShortConstant ((ushort) constant_value);
else if (type == TypeManager.sbyte_type)
retval = new SByteConstant ((sbyte) constant_value);
else if (type == TypeManager.byte_type)
retval = new ByteConstant ((byte) constant_value);
else if (type == TypeManager.char_type)
retval = new CharConstant ((char) constant_value);
else if (type == TypeManager.bool_type)
retval = new BoolConstant ((bool) constant_value);
else if (type == TypeManager.decimal_type)
retval = new DecimalConstant ((decimal) constant_value);
else
throw new Exception ("LookupConstantValue: Unhandled constant type: " + type);
return retval;
}
/// <summary>
/// Looks up the value of a constant field. Defines it if it hasn't
/// already been. Similar to LookupEnumValue in spirit.
/// </summary>
public bool LookupConstantValue (out object value)
{
if (resolved) {
value = ConstantValue;
return true;
}
if (in_transit) {
Report.Error (110, Location,
"The evaluation of the constant value for `" +
Name + "' involves a circular definition.");
value = null;
return false;
}
in_transit = true;
int errors = Report.Errors;
//
// We might have cleared Expr ourselves in a recursive definition
//
if (Expr == null){
value = null;
return false;
}
Expr = Expr.Resolve (const_ec);
in_transit = false;
if (Expr == null) {
if (errors == Report.Errors)
Report.Error (150, Location, "A constant value is expected");
value = null;
return false;
}
Expression real_expr = Expr;
Constant ce = Expr as Constant;
if (ce == null){
UnCheckedExpr un_expr = Expr as UnCheckedExpr;
CheckedExpr ch_expr = Expr as CheckedExpr;
EmptyCast ec_expr = Expr as EmptyCast;
if ((un_expr != null) && (un_expr.Expr is Constant))
Expr = un_expr.Expr;
else if ((ch_expr != null) && (ch_expr.Expr is Constant))
Expr = ch_expr.Expr;
else if ((ec_expr != null) && (ec_expr.Child is Constant))
Expr = ec_expr.Child;
else if (Expr is ArrayCreation){
Report.Error (133, Location, "Arrays can not be constant");
} else {
if (errors == Report.Errors)
Report.Error (150, Location, "A constant value is expected");
value = null;
return false;
}
ce = Expr as Constant;
}
if (MemberType != real_expr.Type) {
ce = ChangeType (Location, ce, MemberType);
if (ce == null){
value = null;
return false;
}
Expr = ce;
}
if (ce != null)
ConstantValue = ce.GetValue ();
if (MemberType.IsEnum){
//
// This sadly does not work for our user-defined enumerations types ;-(
//
try {
ConstantValue = System.Enum.ToObject (
MemberType, ConstantValue);
} catch (ArgumentException){
Report.Error (
-16, Location,
".NET SDK 1.0 does not permit to create the constant "+
" field from a user-defined enumeration");
}
}
if (ce is DecimalConstant) {
Decimal d = ((DecimalConstant)ce).Value;
int[] bits = Decimal.GetBits (d);
object[] args = new object[] { (byte)(bits [3] >> 16), (byte)(bits [3] >> 31), (uint)bits [2], (uint)bits [1], (uint)bits [0] };
CustomAttributeBuilder cab = new CustomAttributeBuilder (TypeManager.decimal_constant_attribute_ctor, args);
FieldBuilder.SetCustomAttribute (cab);
}
else{
FieldBuilder.SetConstant (ConstantValue);
}
if (!TypeManager.RegisterFieldValue (FieldBuilder, ConstantValue))
throw new Exception ("Cannot register const value");
value = ConstantValue;
resolved = true;
return true;
}
/// <summary>
/// Emits the field value by evaluating the expression
/// </summary>
public override void Emit ()
{
object value;
LookupConstantValue (out value);
if (OptAttributes != null) {
OptAttributes.Emit (const_ec, this);
}
base.Emit ();
}
}
}
-1540
View File
File diff suppressed because it is too large. Load diff
-2480
View File
File diff suppressed because it is too large. Load diff
-2477
View File
File diff suppressed because it is too large. Load diff
-1064
View File
File diff suppressed because it is too large. Load diff
-819
View File
@@ -1,819 +0,0 @@
//
// doc.cs: Support for XML documentation comment.
//
// Author:
// Atsushi Enomoto <[email protected]>
//
// Licensed under the terms of the GNU GPL
//
// (C) 2004 Novell, Inc.
//
//
using System;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Xml;
using Mono.CompilerServices.SymbolWriter;
namespace Mono.CSharp {
//
// Support class for XML documentation.
//
public static class DocUtil
{
// TypeContainer
//
// Generates xml doc comments (if any), and if required,
// handle warning report.
//
internal static void GenerateTypeDocComment (TypeContainer t,
DeclSpace ds)
{
GenerateDocComment (t, ds);
if (t.DefaultStaticConstructor != null)
t.DefaultStaticConstructor.GenerateDocComment (t);
if (t.InstanceConstructors != null)
foreach (Constructor c in t.InstanceConstructors)
c.GenerateDocComment (t);
if (t.Types != null)
foreach (TypeContainer tc in t.Types)
tc.GenerateDocComment (t);
if (t.Parts != null) {
IDictionary comments = RootContext.Documentation.PartialComments;
foreach (ClassPart cp in t.Parts) {
if (cp.DocComment == null)
continue;
comments [cp] = cp;
}
}
if (t.Enums != null)
foreach (Enum en in t.Enums)
en.GenerateDocComment (t);
if (t.Constants != null)
foreach (Const c in t.Constants)
c.GenerateDocComment (t);
if (t.Fields != null)
foreach (Field f in t.Fields)
f.GenerateDocComment (t);
if (t.Events != null)
foreach (Event e in t.Events)
e.GenerateDocComment (t);
if (t.Indexers != null)
foreach (Indexer ix in t.Indexers)
ix.GenerateDocComment (t);
if (t.Properties != null)
foreach (Property p in t.Properties)
p.GenerateDocComment (t);
if (t.Methods != null)
foreach (Method m in t.Methods)
m.GenerateDocComment (t);
if (t.Operators != null)
foreach (Operator o in t.Operators)
o.GenerateDocComment (t);
}
// MemberCore
private static readonly string lineHead =
Environment.NewLine + " ";
private static XmlNode GetDocCommentNode (MemberCore mc,
string name)
{
// FIXME: It could be even optimizable as not
// to use XmlDocument. But anyways the nodes
// are not kept in memory.
XmlDocument doc = RootContext.Documentation.XmlDocumentation;
try {
XmlElement el = doc.CreateElement ("member");
el.SetAttribute ("name", name);
string normalized = mc.DocComment;
el.InnerXml = normalized;
// csc keeps lines as written in the sources
// and inserts formatting indentation (which
// is different from XmlTextWriter.Formatting
// one), but when a start tag contains an
// endline, it joins the next line. We don't
// have to follow such a hacky behavior.
string [] split =
normalized.Split ('\n');
int j = 0;
for (int i = 0; i < split.Length; i++) {
string s = split [i].TrimEnd ();
if (s.Length > 0)
split [j++] = s;
}
el.InnerXml = lineHead + String.Join (
lineHead, split, 0, j);
return el;
} catch (XmlException ex) {
Report.Warning (1570, 1, mc.Location, "XML comment on '{0}' has non-well-formed XML ({1}).", name, ex.Message);
XmlComment com = doc.CreateComment (String.Format ("FIXME: Invalid documentation markup was found for member {0}", name));
return com;
}
}
//
// Generates xml doc comments (if any), and if required,
// handle warning report.
//
internal static void GenerateDocComment (MemberCore mc,
DeclSpace ds)
{
if (mc.DocComment != null) {
string name = mc.GetDocCommentName (ds);
XmlNode n = GetDocCommentNode (mc, name);
XmlElement el = n as XmlElement;
if (el != null) {
mc.OnGenerateDocComment (ds, el);
// FIXME: it could be done with XmlReader
foreach (XmlElement inc in n.SelectNodes (".//include"))
HandleInclude (mc, inc);
// FIXME: it could be done with XmlReader
DeclSpace dsTarget = mc as DeclSpace;
if (dsTarget == null)
dsTarget = ds;
foreach (XmlElement see in n.SelectNodes (".//see"))
HandleSee (mc, dsTarget, see);
foreach (XmlElement seealso in n.SelectNodes (".//seealso"))
HandleSeeAlso (mc, dsTarget, seealso);
foreach (XmlElement see in n.SelectNodes (".//exception"))
HandleException (mc, dsTarget, see);
}
n.WriteTo (RootContext.Documentation.XmlCommentOutput);
}
else if (mc.IsExposedFromAssembly (ds)) {
Constructor c = mc as Constructor;
if (c == null || !c.IsDefault ())
Report.Warning (1591, 4, mc.Location,
"Missing XML comment for publicly visible type or member '{0}'", mc.GetSignatureForError ());
}
}
//
// Processes "include" element. Check included file and
// embed the document content inside this documentation node.
//
private static void HandleInclude (MemberCore mc, XmlElement el)
{
string file = el.GetAttribute ("file");
string path = el.GetAttribute ("path");
if (file == "") {
Report.Warning (1590, 1, mc.Location, "Invalid XML 'include' element; Missing 'file' attribute.");
el.ParentNode.InsertBefore (el.OwnerDocument.CreateComment (" Include tag is invalid "), el);
}
else if (path == "") {
Report.Warning (1590, 1, mc.Location, "Invalid XML 'include' element; Missing 'path' attribute.");
el.ParentNode.InsertBefore (el.OwnerDocument.CreateComment (" Include tag is invalid "), el);
}
else {
XmlDocument doc = RootContext.Documentation.StoredDocuments [file] as XmlDocument;
if (doc == null) {
try {
doc = new XmlDocument ();
doc.Load (file);
RootContext.Documentation.StoredDocuments.Add (file, doc);
} catch (Exception) {
el.ParentNode.InsertBefore (el.OwnerDocument.CreateComment (String.Format (" Badly formed XML in at comment file '{0}': cannot be included ", file)), el);
Report.Warning (1592, 1, mc.Location, "Badly formed XML in included comments file -- '{0}'", file);
}
}
bool keepIncludeNode = false;
if (doc != null) {
try {
XmlNodeList nl = doc.SelectNodes (path);
if (nl.Count == 0) {
el.ParentNode.InsertBefore (el.OwnerDocument.CreateComment (" No matching elements were found for the include tag embedded here. "), el);
keepIncludeNode = true;
}
foreach (XmlNode n in nl)
el.ParentNode.InsertBefore (el.OwnerDocument.ImportNode (n, true), el);
} catch (Exception ex) {
el.ParentNode.InsertBefore (el.OwnerDocument.CreateComment (" Failed to insert some or all of included XML "), el);
Report.Warning (1589, 1, mc.Location, "Unable to include XML fragment '{0}' of file {1} -- {2}.", path, file, ex.Message);
}
}
if (!keepIncludeNode)
el.ParentNode.RemoveChild (el);
}
}
//
// Handles <see> elements.
//
private static void HandleSee (MemberCore mc,
DeclSpace ds, XmlElement see)
{
HandleXrefCommon (mc, ds, see);
}
//
// Handles <seealso> elements.
//
private static void HandleSeeAlso (MemberCore mc,
DeclSpace ds, XmlElement seealso)
{
HandleXrefCommon (mc, ds, seealso);
}
//
// Handles <exception> elements.
//
private static void HandleException (MemberCore mc,
DeclSpace ds, XmlElement seealso)
{
HandleXrefCommon (mc, ds, seealso);
}
static readonly char [] wsChars =
new char [] {' ', '\t', '\n', '\r'};
//
// returns a full runtime type name from a name which might
// be C# specific type name.
//
private static Type FindDocumentedType (MemberCore mc, string name, DeclSpace ds, string cref)
{
bool isArray = false;
string identifier = name;
if (name [name.Length - 1] == ']') {
string tmp = name.Substring (0, name.Length - 1).Trim (wsChars);
if (tmp [tmp.Length - 1] == '[') {
identifier = tmp.Substring (0, tmp.Length - 1).Trim (wsChars);
isArray = true;
}
}
Type t = FindDocumentedTypeNonArray (mc, identifier, ds, cref);
if (t != null && isArray)
t = Array.CreateInstance (t, 0).GetType ();
return t;
}
private static Type FindDocumentedTypeNonArray (MemberCore mc,
string identifier, DeclSpace ds, string cref)
{
switch (identifier) {
case "int":
return typeof (int);
case "uint":
return typeof (uint);
case "short":
return typeof (short);
case "ushort":
return typeof (ushort);
case "long":
return typeof (long);
case "ulong":
return typeof (ulong);
case "float":
return typeof (float);
case "double":
return typeof (double);
case "char":
return typeof (char);
case "decimal":
return typeof (decimal);
case "byte":
return typeof (byte);
case "sbyte":
return typeof (sbyte);
case "object":
return typeof (object);
case "bool":
return typeof (bool);
case "string":
return typeof (string);
case "void":
return typeof (void);
}
FullNamedExpression e = ds.FindType (mc.Location, identifier);
if (e != null) {
if (!(e is TypeExpr))
return null;
return ((TypeExpr) e).ResolveType (ds.EmitContext);
}
int index = identifier.LastIndexOf ('.');
if (index < 0)
return null;
int warn;
Type parent = FindDocumentedType (mc, identifier.Substring (0, index), ds, cref);
if (parent == null)
return null;
return FindDocumentedMember (mc, parent,
identifier.Substring (index + 1),
Type.EmptyTypes,
ds, out warn, cref) as Type;
}
//
// Returns a MemberInfo that is referenced in XML documentation
// (by "see" or "seealso" elements).
//
private static MemberInfo FindDocumentedMember (MemberCore mc,
Type type, string memberName, Type [] paramList,
DeclSpace ds, out int warningType, string cref)
{
warningType = 0;
MethodSignature msig = new MethodSignature (memberName, null, paramList);
MemberInfo [] mis = type.FindMembers (
MemberTypes.All,
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance,
MethodSignature.method_signature_filter,
msig);
if (mis.Length > 0)
return mis [0];
if (paramList.Length == 0) {
// search for fields/events etc.
mis = type.FindMembers (
MemberTypes.All,
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance,
Type.FilterName,
memberName);
return (mis.Length > 0) ? mis [0] : null;
}
// search for operators (whose parameters exactly
// matches with the list) and possibly report CS1581.
string oper = null;
string returnTypeName = null;
if (memberName.StartsWith ("implicit operator ")) {
oper = "op_Implicit";
returnTypeName = memberName.Substring (18).Trim (wsChars);
}
else if (memberName.StartsWith ("explicit operator ")) {
oper = "op_Explicit";
returnTypeName = memberName.Substring (18).Trim (wsChars);
}
else if (memberName.StartsWith ("operator ")) {
oper = memberName.Substring (9).Trim (wsChars);
switch (oper) {
// either unary or binary
case "+":
oper = paramList.Length == 2 ?
Binary.oper_names [(int) Binary.Operator.Addition] :
Unary.oper_names [(int) Unary.Operator.UnaryPlus];
break;
case "-":
oper = paramList.Length == 2 ?
Binary.oper_names [(int) Binary.Operator.Subtraction] :
Unary.oper_names [(int) Unary.Operator.UnaryNegation];
break;
// unary
case "!":
oper = Unary.oper_names [(int) Unary.Operator.LogicalNot]; break;
case "~":
oper = Unary.oper_names [(int) Unary.Operator.OnesComplement]; break;
case "++":
oper = "op_Increment"; break;
case "--":
oper = "op_Decrement"; break;
case "true":
oper = "op_True"; break;
case "false":
oper = "op_False"; break;
// binary
case "*":
oper = Binary.oper_names [(int) Binary.Operator.Multiply]; break;
case "/":
oper = Binary.oper_names [(int) Binary.Operator.Division]; break;
case "%":
oper = Binary.oper_names [(int) Binary.Operator.Modulus]; break;
case "&":
oper = Binary.oper_names [(int) Binary.Operator.BitwiseAnd]; break;
case "|":
oper = Binary.oper_names [(int) Binary.Operator.BitwiseOr]; break;
case "^":
oper = Binary.oper_names [(int) Binary.Operator.ExclusiveOr]; break;
case "<<":
oper = Binary.oper_names [(int) Binary.Operator.LeftShift]; break;
case ">>":
oper = Binary.oper_names [(int) Binary.Operator.RightShift]; break;
case "==":
oper = Binary.oper_names [(int) Binary.Operator.Equality]; break;
case "!=":
oper = Binary.oper_names [(int) Binary.Operator.Inequality]; break;
case "<":
oper = Binary.oper_names [(int) Binary.Operator.LessThan]; break;
case ">":
oper = Binary.oper_names [(int) Binary.Operator.GreaterThan]; break;
case "<=":
oper = Binary.oper_names [(int) Binary.Operator.LessThanOrEqual]; break;
case ">=":
oper = Binary.oper_names [(int) Binary.Operator.GreaterThanOrEqual]; break;
default:
warningType = 1584;
Report.Warning (1020, 1, mc.Location, "Overloadable {0} operator is expected", paramList.Length == 2 ? "binary" : "unary");
Report.Warning (1584, 1, mc.Location, "XML comment on '{0}' has syntactically incorrect attribute '{1}'", mc.GetSignatureForError (), cref);
return null;
}
}
// here we still does not consider return type (to
// detect CS1581 or CS1002+CS1584).
msig = new MethodSignature (oper, null, paramList);
mis = type.FindMembers (
MemberTypes.Method,
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static,
MethodSignature.method_signature_filter,
msig);
if (mis.Length == 0)
return null; // CS1574
MemberInfo mi = mis [0];
Type expected = mi is MethodInfo ?
((MethodInfo) mi).ReturnType :
mi is PropertyInfo ?
((PropertyInfo) mi).PropertyType :
null;
if (returnTypeName != null) {
Type returnType = FindDocumentedType (mc, returnTypeName, ds, cref);
if (returnType == null || returnType != expected) {
warningType = 1581;
Report.Warning (1581, 1, mc.Location, "Invalid return type in XML comment cref attribute '{0}'", cref);
return null;
}
}
return mis [0];
}
//
// Processes "see" or "seealso" elements.
// Checks cref attribute.
//
private static void HandleXrefCommon (MemberCore mc,
DeclSpace ds, XmlElement xref)
{
string cref = xref.GetAttribute ("cref").Trim (wsChars);
// when, XmlReader, "if (cref == null)"
if (!xref.HasAttribute ("cref"))
return;
if (cref.Length == 0)
Report.Warning (1001, 1, mc.Location, "Identifier expected");
// ... and continue until CS1584.
string signature; // "x:" are stripped
string name; // method invokation "(...)" are removed
string parameters; // method parameter list
// strip 'T:' 'M:' 'F:' 'P:' 'E:' etc.
// Here, MS ignores its member kind. No idea why.
if (cref.Length > 2 && cref [1] == ':')
signature = cref.Substring (2).Trim (wsChars);
else
signature = cref;
int parensPos = signature.IndexOf ('(');
if (parensPos > 0 && signature [signature.Length - 1] == ')') {
name = signature.Substring (0, parensPos).Trim (wsChars);
parameters = signature.Substring (parensPos + 1, signature.Length - parensPos - 2);
}
else {
name = signature;
parameters = String.Empty;
}
string identifier = name;
if (name.Length > 0 && name [name.Length - 1] == ']') {
string tmp = name.Substring (0, name.Length - 1).Trim (wsChars);
if (tmp [tmp.Length - 1] == '[')
identifier = tmp.Substring (0, tmp.Length - 1).Trim (wsChars);
}
// Check if identifier is valid.
// This check is not necessary to mark as error, but
// csc specially reports CS1584 for wrong identifiers.
foreach (string nameElem in identifier.Split ('.')) {
if (!Tokenizer.IsValidIdentifier (nameElem)
&& nameElem.IndexOf ("operator") < 0) {
if (nameElem.EndsWith ("[]") &&
Tokenizer.IsValidIdentifier (
nameElem.Substring (
0, nameElem.Length - 2)))
continue;
Report.Warning (1584, 1, mc.Location, "XML comment on '{0}' has syntactically incorrect attribute '{1}'", mc.GetSignatureForError (), cref);
xref.SetAttribute ("cref", "!:" + signature);
return;
}
}
// check if parameters are valid
Type [] parameterTypes = Type.EmptyTypes;
if (parameters.Length > 0) {
string [] paramList = parameters.Split (',');
ArrayList plist = new ArrayList ();
for (int i = 0; i < paramList.Length; i++) {
string paramTypeName = paramList [i].Trim (wsChars);
Type paramType = FindDocumentedType (mc, paramTypeName, ds, cref);
if (paramType == null) {
Report.Warning (1580, 1, mc.Location, "Invalid type for parameter '{0}' in XML comment cref attribute '{1}'", i + 1, cref);
return;
}
plist.Add (paramType);
}
parameterTypes = plist.ToArray (typeof (Type)) as Type [];
StringBuilder sb = new StringBuilder ();
sb.Append ('(');
for (int i = 0; i < parameterTypes.Length; i++) {
Type t = parameterTypes [i];
if (sb.Length > 1)
sb.Append (',');
sb.Append (t.FullName.Replace ('+', '.'));
}
sb.Append (')');
parameters = sb.ToString ();
}
Type type = FindDocumentedType (mc, name, ds, cref);
if (type != null) {
xref.SetAttribute ("cref", "T:" + type.FullName.Replace ("+", "."));
return; // a type
}
// don't use identifier here. System[] is not alloed.
if (Namespace.IsNamespace (name)) {
xref.SetAttribute ("cref", "N:" + name);
return; // a namespace
}
int period = name.LastIndexOf ('.');
if (period > 0) {
string typeName = name.Substring (0, period);
string memberName = name.Substring (period + 1);
type = FindDocumentedType (mc, typeName, ds, cref);
int warnResult;
if (type != null) {
MemberInfo mi = FindDocumentedMember (mc, type, memberName, parameterTypes, ds, out warnResult, cref);
if (warnResult > 0)
return;
if (mi != null) {
xref.SetAttribute ("cref", GetMemberDocHead (mi.MemberType) + type.FullName.Replace ("+", ".") + "." + memberName + parameters);
return; // a member of a type
}
}
}
else {
int warnResult;
MemberInfo mi = FindDocumentedMember (mc, ds.TypeBuilder, name, parameterTypes, ds, out warnResult, cref);
if (warnResult > 0)
return;
if (mi != null) {
xref.SetAttribute ("cref", GetMemberDocHead (mi.MemberType) + ds.TypeBuilder.FullName.Replace ("+", ".") + "." + name);
return; // local member name
}
}
Report.Warning (1574, 1, mc.Location, "XML comment on '{0}' has cref attribute '{1}' that could not be resolved in '{2}'.", mc.GetSignatureForError (), cref, ds.GetSignatureForError ());
xref.SetAttribute ("cref", "!:" + name);
}
//
// Get a prefix from member type for XML documentation (used
// to formalize cref target name).
//
static string GetMemberDocHead (MemberTypes type)
{
switch (type) {
case MemberTypes.Constructor:
case MemberTypes.Method:
return "M:";
case MemberTypes.Event:
return "E:";
case MemberTypes.Field:
return "F:";
case MemberTypes.NestedType:
case MemberTypes.TypeInfo:
return "T:";
case MemberTypes.Property:
return "P:";
}
return "!:";
}
// MethodCore
//
// Returns a string that represents the signature for this
// member which should be used in XML documentation.
//
public static string GetMethodDocCommentName (MethodCore mc, DeclSpace ds)
{
Parameter [] plist = mc.Parameters.FixedParameters;
Parameter parr = mc.Parameters.ArrayParameter;
string paramSpec = String.Empty;
if (plist != null) {
StringBuilder psb = new StringBuilder ();
foreach (Parameter p in plist) {
psb.Append (psb.Length != 0 ? "," : "(");
psb.Append (p.ParameterType.FullName.Replace ("+", "."));
}
paramSpec = psb.ToString ();
}
if (parr != null)
paramSpec += String.Concat (
paramSpec == String.Empty ? "(" : ",",
parr.ParameterType.FullName.Replace ("+", "."));
if (paramSpec.Length > 0)
paramSpec += ")";
string name = mc is Constructor ? "#ctor" : mc.Name;
string suffix = String.Empty;
Operator op = mc as Operator;
if (op != null) {
switch (op.OperatorType) {
case Operator.OpType.Implicit:
case Operator.OpType.Explicit:
suffix = "~" + op.OperatorMethodBuilder.ReturnType.FullName.Replace ('+', '.');
break;
}
}
return String.Concat (mc.DocCommentHeader, ds.Name, ".", name, paramSpec, suffix);
}
//
// Raised (and passed an XmlElement that contains the comment)
// when GenerateDocComment is writing documentation expectedly.
//
// FIXME: with a few effort, it could be done with XmlReader,
// that means removal of DOM use.
//
internal static void OnMethodGenerateDocComment (
MethodCore mc, DeclSpace ds, XmlElement el)
{
Hashtable paramTags = new Hashtable ();
foreach (XmlElement pelem in el.SelectNodes ("param")) {
int i;
string xname = pelem.GetAttribute ("name");
if (xname == "")
continue; // really? but MS looks doing so
if (xname != "" && mc.Parameters.GetParameterByName (xname, out i) == null)
Report.Warning (1572, 2, mc.Location, "XML comment on '{0}' has a 'param' tag for '{1}', but there is no such parameter.", mc.Name, xname);
else if (paramTags [xname] != null)
Report.Warning (1571, 2, mc.Location, "XML comment on '{0}' has a duplicate param tag for '{1}'", mc.Name, xname);
paramTags [xname] = xname;
}
Parameter [] plist = mc.Parameters.FixedParameters;
if (plist != null) {
foreach (Parameter p in plist) {
if (paramTags.Count > 0 && paramTags [p.Name] == null)
Report.Warning (1573, 4, mc.Location, "Parameter '{0}' has no matching param tag in the XML comment for '{1}' (but other parameters do)", mc.Name, p.Name);
}
}
}
// Enum
public static void GenerateEnumDocComment (Enum e, DeclSpace ds)
{
GenerateDocComment (e, ds);
foreach (string name in e.ordered_enums) {
MemberCore mc = e.GetDefinition (name);
GenerateDocComment (mc, e);
}
}
}
//
// Implements XML documentation generation.
//
public class Documentation
{
public Documentation (string xml_output_filename)
{
docfilename = xml_output_filename;
XmlDocumentation = new XmlDocument ();
XmlDocumentation.PreserveWhitespace = false;
}
private string docfilename;
//
// Used to create element which helps well-formedness checking.
//
public XmlDocument XmlDocumentation;
//
// The output for XML documentation.
//
public XmlWriter XmlCommentOutput;
//
// Stores XmlDocuments that are included in XML documentation.
// Keys are included filenames, values are XmlDocuments.
//
public Hashtable StoredDocuments = new Hashtable ();
//
// Stores comments on partial types (should handle uniquely).
// Keys are PartialContainers, values are comment strings
// (didn't use StringBuilder; usually we have just 2 or more).
//
public IDictionary PartialComments = new ListDictionary ();
//
// Outputs XML documentation comment from tokenized comments.
//
public bool OutputDocComment (string asmfilename)
{
XmlTextWriter w = null;
try {
w = new XmlTextWriter (docfilename, null);
w.Indentation = 4;
w.Formatting = Formatting.Indented;
w.WriteStartDocument ();
w.WriteStartElement ("doc");
w.WriteStartElement ("assembly");
w.WriteStartElement ("name");
w.WriteString (Path.ChangeExtension (asmfilename, null));
w.WriteEndElement (); // name
w.WriteEndElement (); // assembly
w.WriteStartElement ("members");
XmlCommentOutput = w;
GenerateDocComment ();
w.WriteFullEndElement (); // members
w.WriteEndElement ();
w.WriteWhitespace (Environment.NewLine);
w.WriteEndDocument ();
return true;
} catch (Exception ex) {
Report.Error (1569, "Error generating XML documentation file '{0}' ('{1}')", docfilename, ex.Message);
return false;
} finally {
if (w != null)
w.Close ();
}
}
//
// Fixes full type name of each documented types/members up.
//
public void GenerateDocComment ()
{
TypeContainer root = RootContext.Tree.Types;
if (root.Interfaces != null)
foreach (Interface i in root.Interfaces)
DocUtil.GenerateTypeDocComment (i, null);
if (root.Types != null)
foreach (TypeContainer tc in root.Types)
DocUtil.GenerateTypeDocComment (tc, null);
if (root.Parts != null) {
IDictionary comments = PartialComments;
foreach (ClassPart cp in root.Parts) {
if (cp.DocComment == null)
continue;
comments [cp] = cp;
}
}
if (root.Delegates != null)
foreach (Delegate d in root.Delegates)
DocUtil.GenerateDocComment (d, null);
if (root.Enums != null)
foreach (Enum e in root.Enums)
DocUtil.GenerateEnumDocComment (e, null);
IDictionary table = new ListDictionary ();
foreach (ClassPart cp in PartialComments.Keys) {
table [cp.PartialContainer] += cp.DocComment;
}
foreach (PartialContainer pc in table.Keys) {
pc.DocComment = table [pc] as string;
DocUtil.GenerateDocComment (pc, null);
}
}
}
}
-1863
View File
File diff suppressed because it is too large. Load diff
-3918
View File
File diff suppressed because it is too large. Load diff
-811
View File
@@ -1,811 +0,0 @@
//
// enum.cs: Enum handling.
//
// Author: Miguel de Icaza ([email protected])
// Ravi Pratap ([email protected])
//
// Licensed under the terms of the GNU GPL
//
// (C) 2001 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.Collections;
using System.Reflection;
using System.Reflection.Emit;
using System.Globalization;
using System.Xml;
namespace Mono.CSharp {
class EnumMember: MemberCore {
static string[] attribute_targets = new string [] { "field" };
Enum parent_enum;
public FieldBuilder builder;
internal readonly Expression Type;
public EnumMember (Enum parent_enum, Expression expr, string name,
Location loc, Attributes attrs):
base (null, new MemberName (name), attrs, loc)
{
this.parent_enum = parent_enum;
this.ModFlags = parent_enum.ModFlags;
this.Type = expr;
}
public override void ApplyAttributeBuilder(Attribute a, CustomAttributeBuilder cb)
{
if (a.Type == TypeManager.marshal_as_attr_type) {
UnmanagedMarshal marshal = a.GetMarshal (this);
if (marshal != null) {
builder.SetMarshal (marshal);
}
return;
}
if (a.Type.IsSubclassOf (TypeManager.security_attr_type)) {
a.Error_InvalidSecurityParent ();
return;
}
builder.SetCustomAttribute (cb);
}
public override AttributeTargets AttributeTargets {
get {
return AttributeTargets.Field;
}
}
public void DefineMember (TypeBuilder tb)
{
FieldAttributes attr = FieldAttributes.Public | FieldAttributes.Static
| FieldAttributes.Literal;
builder = tb.DefineField (Name, tb, attr);
}
public override bool Define ()
{
throw new NotImplementedException ();
}
public void Emit (EmitContext ec)
{
if (OptAttributes != null)
OptAttributes.Emit (ec, this);
Emit ();
}
public override string GetSignatureForError()
{
return String.Concat (parent_enum.GetSignatureForError (), '.', base.GetSignatureForError ());
}
public override string[] ValidAttributeTargets {
get {
return attribute_targets;
}
}
protected override bool VerifyClsCompliance(DeclSpace ds)
{
// Because parent is TypeContainer and we have only DeclSpace parent.
// Parameter replacing is required
return base.VerifyClsCompliance (parent_enum);
}
// There is no base type
protected override void VerifyObsoleteAttribute()
{
}
public override string DocCommentHeader {
get { return "F:"; }
}
}
/// <summary>
/// Enumeration container
/// </summary>
public class Enum : DeclSpace {
public ArrayList ordered_enums;
public Expression BaseType;
public Type UnderlyingType;
Hashtable member_to_location;
//
// This is for members that have been defined
//
Hashtable member_to_value;
//
// This is used to mark members we're currently defining
//
Hashtable in_transit;
ArrayList field_builders;
public const int AllowedModifiers =
Modifiers.NEW |
Modifiers.PUBLIC |
Modifiers.PROTECTED |
Modifiers.INTERNAL |
Modifiers.PRIVATE;
public Enum (NamespaceEntry ns, TypeContainer parent, Expression type,
int mod_flags, MemberName name, Attributes attrs, Location l)
: base (ns, parent, name, attrs, l)
{
this.BaseType = type;
ModFlags = Modifiers.Check (AllowedModifiers, mod_flags,
IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE, l);
ordered_enums = new ArrayList ();
member_to_location = new Hashtable ();
member_to_value = new Hashtable ();
in_transit = new Hashtable ();
field_builders = new ArrayList ();
}
/// <summary>
/// Adds @name to the enumeration space, with @expr
/// being its definition.
/// </summary>
public void AddEnumMember (string name, Expression expr, Location loc, Attributes opt_attrs, string documentation)
{
if (name == "value__") {
Report.Error (76, loc, "An item in an enumeration can't have an identifier `value__'");
return;
}
EnumMember em = new EnumMember (this, expr, name, loc, opt_attrs);
em.DocComment = documentation;
if (!AddToContainer (em, name, ""))
return;
// TODO: can be almost deleted
ordered_enums.Add (name);
member_to_location.Add (name, loc);
}
//
// This is used by corlib compilation: we map from our
// type to a type that is consumable by the DefineField
//
Type MapToInternalType (Type t)
{
if (t == TypeManager.int32_type)
return typeof (int);
if (t == TypeManager.int64_type)
return typeof (long);
if (t == TypeManager.uint32_type)
return typeof (uint);
if (t == TypeManager.uint64_type)
return typeof (ulong);
if (t == TypeManager.float_type)
return typeof (float);
if (t == TypeManager.double_type)
return typeof (double);
if (t == TypeManager.byte_type)
return typeof (byte);
if (t == TypeManager.sbyte_type)
return typeof (sbyte);
if (t == TypeManager.char_type)
return typeof (char);
if (t == TypeManager.short_type)
return typeof (short);
if (t == TypeManager.ushort_type)
return typeof (ushort);
throw new Exception ();
}
public override TypeBuilder DefineType ()
{
if (TypeBuilder != null)
return TypeBuilder;
TypeAttributes attr = Modifiers.TypeAttr (ModFlags, IsTopLevel);
ec = new EmitContext (this, this, Location, null, null, ModFlags, false);
attr |= TypeAttributes.Class | TypeAttributes.Sealed;
if (!(BaseType is TypeLookupExpression)) {
Report.Error (1008, Location,
"Type byte, sbyte, short, ushort, int, uint, " +
"long, or ulong expected (got: `{0}')", BaseType);
return null;
}
TypeExpr ute = ResolveBaseTypeExpr (BaseType, false, Location);
if (ute == null)
return null;
UnderlyingType = ute.Type;
if (UnderlyingType != TypeManager.int32_type &&
UnderlyingType != TypeManager.uint32_type &&
UnderlyingType != TypeManager.int64_type &&
UnderlyingType != TypeManager.uint64_type &&
UnderlyingType != TypeManager.short_type &&
UnderlyingType != TypeManager.ushort_type &&
UnderlyingType != TypeManager.byte_type &&
UnderlyingType != TypeManager.sbyte_type) {
Report.Error (1008, Location,
"Type byte, sbyte, short, ushort, int, uint, " +
"long, or ulong expected (got: " +
TypeManager.CSharpName (UnderlyingType) + ")");
return null;
}
if (IsTopLevel) {
if (TypeManager.NamespaceClash (Name, Location))
return null;
ModuleBuilder builder = CodeGen.Module.Builder;
TypeBuilder = builder.DefineType (Name, attr, TypeManager.enum_type);
} else {
TypeBuilder builder = Parent.TypeBuilder;
TypeBuilder = builder.DefineNestedType (
Basename, attr, TypeManager.enum_type);
}
//
// Call MapToInternalType for corlib
//
TypeBuilder.DefineField ("value__", UnderlyingType,
FieldAttributes.Public | FieldAttributes.SpecialName
| FieldAttributes.RTSpecialName);
TypeManager.AddEnumType (Name, TypeBuilder, this);
return TypeBuilder;
}
bool IsValidEnumConstant (Expression e)
{
if (!(e is Constant))
return false;
if (e is IntConstant || e is UIntConstant || e is LongConstant ||
e is ByteConstant || e is SByteConstant || e is ShortConstant ||
e is UShortConstant || e is ULongConstant || e is EnumConstant ||
e is CharConstant)
return true;
else
return false;
}
object GetNextDefaultValue (object default_value)
{
if (UnderlyingType == TypeManager.int32_type) {
int i = (int) default_value;
if (i < System.Int32.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.uint32_type) {
uint i = (uint) default_value;
if (i < System.UInt32.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.int64_type) {
long i = (long) default_value;
if (i < System.Int64.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.uint64_type) {
ulong i = (ulong) default_value;
if (i < System.UInt64.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.short_type) {
short i = (short) default_value;
if (i < System.Int16.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.ushort_type) {
ushort i = (ushort) default_value;
if (i < System.UInt16.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.byte_type) {
byte i = (byte) default_value;
if (i < System.Byte.MaxValue)
return ++i;
else
return null;
} else if (UnderlyingType == TypeManager.sbyte_type) {
sbyte i = (sbyte) default_value;
if (i < System.SByte.MaxValue)
return ++i;
else
return null;
}
return null;
}
void Error_ConstantValueCannotBeConverted (object val, Location loc)
{
if (val is Constant)
Report.Error (31, loc, "Constant value '" + ((Constant) val).AsString () +
"' cannot be converted" +
" to a " + TypeManager.CSharpName (UnderlyingType));
else
Report.Error (31, loc, "Constant value '" + val +
"' cannot be converted" +
" to a " + TypeManager.CSharpName (UnderlyingType));
return;
}
/// <summary>
/// Determines if a standard implicit conversion exists from
/// expr_type to target_type
/// </summary>
public static bool WideningConversionExists (Type expr_type, Type target_type)
{
expr_type = TypeManager.TypeToCoreType (expr_type);
if (expr_type == TypeManager.void_type)
return false;
if (expr_type == target_type)
return true;
// First numeric conversions
if (expr_type == TypeManager.sbyte_type){
//
// From sbyte to short, int, long, float, double.
//
if ((target_type == TypeManager.int32_type) ||
(target_type == TypeManager.int64_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.short_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.byte_type){
//
// From byte to short, ushort, int, uint, long, ulong, float, double
//
if ((target_type == TypeManager.short_type) ||
(target_type == TypeManager.ushort_type) ||
(target_type == TypeManager.int32_type) ||
(target_type == TypeManager.uint32_type) ||
(target_type == TypeManager.uint64_type) ||
(target_type == TypeManager.int64_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.short_type){
//
// From short to int, long, float, double
//
if ((target_type == TypeManager.int32_type) ||
(target_type == TypeManager.int64_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.ushort_type){
//
// From ushort to int, uint, long, ulong, float, double
//
if ((target_type == TypeManager.uint32_type) ||
(target_type == TypeManager.uint64_type) ||
(target_type == TypeManager.int32_type) ||
(target_type == TypeManager.int64_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.int32_type){
//
// From int to long, float, double
//
if ((target_type == TypeManager.int64_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.uint32_type){
//
// From uint to long, ulong, float, double
//
if ((target_type == TypeManager.int64_type) ||
(target_type == TypeManager.uint64_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if ((expr_type == TypeManager.uint64_type) ||
(expr_type == TypeManager.int64_type)) {
//
// From long/ulong to float, double
//
if ((target_type == TypeManager.double_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.char_type){
//
// From char to ushort, int, uint, long, ulong, float, double
//
if ((target_type == TypeManager.ushort_type) ||
(target_type == TypeManager.int32_type) ||
(target_type == TypeManager.uint32_type) ||
(target_type == TypeManager.uint64_type) ||
(target_type == TypeManager.int64_type) ||
(target_type == TypeManager.float_type) ||
(target_type == TypeManager.double_type) ||
(target_type == TypeManager.decimal_type))
return true;
} else if (expr_type == TypeManager.float_type){
//
// float to double
//
if (target_type == TypeManager.double_type)
return true;
}
return false;
}
//
// Horrible, horrible. But there is no other way we can pass the EmitContext
// to the recursive definition triggered by the evaluation of a forward
// expression
//
static EmitContext current_ec = null;
/// <summary>
/// This is used to lookup the value of an enum member. If the member is undefined,
/// it attempts to define it and return its value
/// </summary>
public object LookupEnumValue (EmitContext ec, string name, Location loc)
{
object default_value = null;
Constant c = null;
default_value = member_to_value [name];
if (default_value != null)
return default_value;
//
// This may happen if we're calling a method in System.Enum, for instance
// Enum.IsDefined().
//
if (!defined_names.Contains (name))
return null;
if (in_transit.Contains (name)) {
Report.Error (110, loc, "The evaluation of the constant value for `" +
Name + "." + name + "' involves a circular definition.");
return null;
}
//
// So if the above doesn't happen, we have a member that is undefined
// We now proceed to define it
//
Expression val = this [name];
if (val == null) {
int idx = ordered_enums.IndexOf (name);
if (idx == 0)
default_value = 0;
else {
for (int i = 0; i < idx; ++i) {
string n = (string) ordered_enums [i];
Location m_loc = (Mono.CSharp.Location)
member_to_location [n];
in_transit.Add (name, true);
EmitContext old_ec = current_ec;
current_ec = ec;
default_value = LookupEnumValue (ec, n, m_loc);
current_ec = old_ec;
in_transit.Remove (name);
if (default_value == null)
return null;
}
default_value = GetNextDefaultValue (default_value);
}
} else {
bool old = ec.InEnumContext;
ec.InEnumContext = true;
in_transit.Add (name, true);
EmitContext old_ec = current_ec;
current_ec = ec;
val = val.Resolve (ec);
current_ec = old_ec;
in_transit.Remove (name);
ec.InEnumContext = old;
if (val == null)
return null;
if (!IsValidEnumConstant (val)) {
Report.Error (
1008, loc,
"Type byte, sbyte, short, ushort, int, uint, long, or " +
"ulong expected (have: " + val + ")");
return null;
}
c = (Constant) val;
default_value = c.GetValue ();
if (default_value == null) {
Error_ConstantValueCannotBeConverted (c, loc);
return null;
}
if (val is EnumConstant){
Type etype = TypeManager.EnumToUnderlying (c.Type);
if (!WideningConversionExists (etype, UnderlyingType)){
Convert.Error_CannotWideningConversion (
loc, c.Type, UnderlyingType);
return null;
}
}
}
EnumMember em = (EnumMember) defined_names [name];
em.DefineMember (TypeBuilder);
bool fail;
default_value = TypeManager.ChangeType (default_value, UnderlyingType, out fail);
if (fail){
Error_ConstantValueCannotBeConverted (c, loc);
return null;
}
em.builder.SetConstant (default_value);
field_builders.Add (em.builder);
member_to_value [name] = default_value;
if (!TypeManager.RegisterFieldValue (em.builder, default_value))
return null;
return default_value;
}
public override bool DefineMembers (TypeContainer parent)
{
return true;
}
public override bool Define ()
{
//
// If there was an error during DefineEnum, return
//
if (TypeBuilder == null)
return false;
ec = new EmitContext (this, this, Location, null, UnderlyingType, ModFlags, false);
object default_value = 0;
foreach (string name in ordered_enums) {
//
// Have we already been defined, thanks to some cross-referencing ?
//
if (member_to_value.Contains (name))
continue;
Location loc = (Mono.CSharp.Location) member_to_location [name];
if (this [name] != null) {
default_value = LookupEnumValue (ec, name, loc);
if (default_value == null)
return true;
} else {
if (name == "value__"){
Report.Error (76, loc, "The name `value__' is reserved for enumerations");
return false;
}
EnumMember em = (EnumMember) defined_names [name];
em.DefineMember (TypeBuilder);
FieldBuilder fb = em.builder;
if (default_value == null) {
Report.Error (543, loc, "Enumerator value for '" + name + "' is too large to " +
"fit in its type");
return false;
}
bool fail;
default_value = TypeManager.ChangeType (default_value, UnderlyingType, out fail);
if (fail){
Error_ConstantValueCannotBeConverted (default_value, loc);
return false;
}
fb.SetConstant (default_value);
field_builders.Add (fb);
member_to_value [name] = default_value;
if (!TypeManager.RegisterFieldValue (fb, default_value))
return false;
}
default_value = GetNextDefaultValue (default_value);
}
return true;
}
public override void Emit ()
{
if (OptAttributes != null) {
OptAttributes.Emit (ec, this);
}
foreach (EnumMember em in defined_names.Values) {
em.Emit (ec);
}
base.Emit ();
}
void VerifyClsName ()
{
Hashtable ht = new Hashtable ();
foreach (string name in ordered_enums) {
string locase = name.ToLower (System.Globalization.CultureInfo.InvariantCulture);
if (!ht.Contains (locase)) {
ht.Add (locase, defined_names [name]);
continue;
}
MemberCore conflict = (MemberCore)ht [locase];
Report.SymbolRelatedToPreviousError (conflict);
conflict = GetDefinition (name);
Report.Error (3005, conflict.Location, "Identifier '{0}' differing only in case is not CLS-compliant", conflict.GetSignatureForError ());
}
}
protected override bool VerifyClsCompliance (DeclSpace ds)
{
if (!base.VerifyClsCompliance (ds))
return false;
VerifyClsName ();
if (!AttributeTester.IsClsCompliant (UnderlyingType)) {
Report.Error (3009, Location, "'{0}': base type '{1}' is not CLS-compliant", GetSignatureForError (), TypeManager.CSharpName (UnderlyingType));
}
return true;
}
/// <summary>
/// Returns full enum name.
/// </summary>
string GetEnumeratorName (string valueName)
{
return String.Concat (Name, ".", valueName);
}
//
// IMemberFinder
//
public override MemberList FindMembers (MemberTypes mt, BindingFlags bf,
MemberFilter filter, object criteria)
{
ArrayList members = new ArrayList ();
if ((mt & MemberTypes.Field) != 0) {
if (criteria is string){
if (member_to_value [criteria] == null && current_ec != null){
LookupEnumValue (current_ec, (string) criteria, Location.Null);
}
}
foreach (FieldBuilder fb in field_builders)
if (filter (fb, criteria) == true)
members.Add (fb);
}
return new MemberList (members);
}
public override MemberCache MemberCache {
get {
return null;
}
}
public ArrayList ValueNames {
get {
return ordered_enums;
}
}
// indexer
public Expression this [string name] {
get {
return ((EnumMember) defined_names [name]).Type;
}
}
public override AttributeTargets AttributeTargets {
get {
return AttributeTargets.Enum;
}
}
protected override void VerifyObsoleteAttribute()
{
// UnderlyingType is never obsolete
}
//
// Generates xml doc comments (if any), and if required,
// handle warning report.
//
internal override void GenerateDocComment (DeclSpace ds)
{
DocUtil.GenerateEnumDocComment (this, ds);
}
//
// Represents header string for documentation comment.
//
public override string DocCommentHeader {
get { return "T:"; }
}
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-100
View File
@@ -1,100 +0,0 @@
// gen-il.cs: Generates MSIL code from the CIR.Tree
//
// Author: Miguel de Icaza ([email protected])
//
// Licensed under the terms of the GNU GPL
//
// (C) 2001 Ximian, Inc. (http://www.ximian.com)
//
using System;
using System.IO;
using System.Collections;
using CIR;
namespace MSIL {
public class Generator : CIR.ITreeDump {
StreamWriter o;
int indent = 0;
void output (string s)
{
Console.Write (s);
o.Write (s);
}
void space ()
{
output (new String (' ', indent * 2));
}
void ioutput (string s)
{
space ();
output (s);
}
void ioutputl (string s)
{
ioutput (s + "\n");
}
string ClassAttributes (Class c)
{
// FIXME
return "";
}
string ILName (string name)
{
return name;
}
string ClassExtends (Class c)
{
return "";
}
void GenerateFromClass (Class c)
{
ioutputl (".class " + ClassAttributes (c) + " " + ILName (c.Name));
ioutputl (ClassExtends (c));
ioutputl ("{");
indent++;
indent--;
ioutputl ("}");
}
void GenerateFromTypes (TypeContainer types)
{
if (types.Types == null)
return;
foreach (DictionaryEntry de in types.Types){
TypeContainer type = (TypeContainer) de.Value;
if (type is Class)
GenerateFromClass ((Class) type);
}
}
public int GenerateFromTree (Tree tree, StreamWriter os)
{
this.o = os;
ioutputl (".assembly test.exe { }");
GenerateFromTypes (tree.Types);
return 0;
}
public void ParseOptions (string options)
{
}
}
}
-988
View File
@@ -1,988 +0,0 @@
// cs-treedump.cs: Dumps the parsed tree to standard output
//
// Author: Miguel de Icaza ([email protected])
//
// Licensed under the terms of the GNU GPL
//
// (C) 2001 Ximian, Inc. (http://www.ximian.com)
//
// TODO:
// Variable declarations
// Fix precedence rules to lower the number of parenthesis.
//
using System;
using System.IO;
using System.Collections;
using CIR;
namespace Generator {
public class TreeDump : CIR.ITreeDump {
StreamWriter o;
int indent;
bool indented;
bool tag_values;
void space ()
{
if (!indented)
output (new String (' ', indent * 8));
indented = true;
}
void output (string s)
{
Console.Write (s);
//o.Write (s);
}
void newline ()
{
output ("\n");
indented = false;
}
void output_newline (string s)
{
output (s);
newline ();
}
void ioutput (string s)
{
space ();
output (s);
}
string GetParameter (Parameter par)
{
Parameter.Modifier f = par.ModFlags;
string mod = "";
switch (f){
case Parameter.Modifier.REF:
mod = "ref "; break;
case Parameter.Modifier.OUT:
mod = "out "; break;
case Parameter.Modifier.PARAMS:
mod = "params "; break;
case Parameter.Modifier.NONE:
mod = ""; break;
}
return mod + par.Type + " " + par.Name;
}
string GetUnary (Unary u, int paren_level)
{
string e;
bool left = true;
string s = "0_ERROR>";
int prec = 0;
switch (u.Oper){
case Unary.Operator.UnaryPlus:
prec = 10;
s = "+";
break;
case Unary.Operator.UnaryNegation:
prec = 10;
s = "-";
break;
case Unary.Operator.LogicalNot:
s = "!";
prec = 10;
break;
case Unary.Operator.OnesComplement:
prec = 10;
s = "~";
break;
case Unary.Operator.Indirection:
prec = 10;
s = "*";
break;
case Unary.Operator.AddressOf:
prec = 10;
s = "&";
break;
case Unary.Operator.PreIncrement:
prec = 11;
s = "++";
break;
case Unary.Operator.PreDecrement:
prec = 11;
s = "--";
break;
case Unary.Operator.PostDecrement:
left = false;
prec = 12;
s = "--";
break;
case Unary.Operator.PostIncrement:
s = "++";
prec = 12;
left = false;
break;
}
e = GetExpression (u.Expr, prec);
if (left)
e = s + e;
else
e = e + s;
if (prec < paren_level)
return "(" + e + ")";
else
return e;
}
string GetBinary (Binary b, int paren_level)
{
string l, r;
string op = null;
bool assoc_left = true;
int prec = 0;
switch (b.Oper){
case Binary.Operator.Multiply:
prec = 9;
op = "*"; break;
case Binary.Operator.Division:
prec = 9;
op = "/"; break;
case Binary.Operator.Modulus:
prec = 9;
op = "%"; break;
case Binary.Operator.Addition:
prec = 8;
op = "+"; break;
case Binary.Operator.Subtraction:
prec = 8;
op = "-"; break;
case Binary.Operator.LeftShift:
prec = 7;
op = "<<"; break;
case Binary.Operator.RightShift:
prec = 7;
op = ">>"; break;
case Binary.Operator.LessThan:
prec = 6;
op = "<"; break;
case Binary.Operator.GreaterThan:
prec = 6;
op = ">"; break;
case Binary.Operator.LessThanOrEqual:
prec = 6;
op = "<="; break;
case Binary.Operator.GreaterThanOrEqual:
prec = 6;
op = ">="; break;
case Binary.Operator.Equality:
prec = 5;
op = "=="; break;
case Binary.Operator.Inequality:
prec = 5;
op = "!="; break;
case Binary.Operator.BitwiseAnd:
prec = 4;
op = "&"; break;
case Binary.Operator.BitwiseOr:
prec = 2;
op = "|"; break;
case Binary.Operator.LogicalAndAlso:
prec = 1;
op = "AndAlso"; break;
case Binary.Operator.LogicalOrElse:
prec = 0;
op = "OrElse"; break;
case Binary.Operator.ExclusiveOr:
prec = 3;
op = "^"; break;
}
l = GetExpression (b.Left, prec - (assoc_left ? 0 : 1));
r = GetExpression (b.Right, prec - (assoc_left ? 0 : 1));
if (prec <= paren_level)
return "(" + l + " " + op + " " + r + ")";
else
return l + " " + op + " " + r;
}
string GetCast (Cast c)
{
return "(" + c.TargetType + ") (" + GetExpression (c.Expr, 0) + ")";
}
string GetConditional (Conditional c)
{
return "(" + GetExpression (c.Expr, 0) + ") ? (" +
GetExpression (c.TrueExpr, 0) + ") : (" +
GetExpression (c.FalseExpr, 0) + ")";
}
string GetAssign (Assign a)
{
return GetExpression (a.Target, 0) + " = " + GetExpression (a.Source, 0);
}
string GetArguments (ArrayList args)
{
string r = "";
if (args != null){
int top = args.Count;
for (int i = 0; i < top; i++){
Argument arg = (Argument) args [i];
switch (arg.ArgType){
case Argument.AType.Ref:
r += "ref "; break;
case Argument.AType.Out:
r += "out "; break;
}
r += GetExpression (arg.Expr, 0);
if (i+1 != top)
r += ", ";
}
}
return "(" + r + ")";
}
string GetInvocation (Invocation i)
{
return GetExpression (i.Expr, 0) + " " + GetArguments (i.Arguments);
}
string GetNew (New n)
{
return "new " + n.RequestedType + GetArguments (n.Arguments);
}
string GetTypeOf (TypeOf t)
{
return "typeof (" + t.QueriedType + ")";
}
string GetSizeOf (SizeOf t)
{
return "sizeof (" + t.QueriedType + ")";
}
string GetMemberAccess (MemberAccess m)
{
return GetExpression (m.Expr, 0) +
(tag_values ? "/* member access */ . " : ".") +
m.Identifier;
}
string GetSimpleName (SimpleName n)
{
string s = n.Name;
if (s.StartsWith ("0_"))
return "id_" + s;
else
return s;
}
string GetProbe (Probe p)
{
string s = GetExpression (p.Expr, 6);
if (p.Oper == CIR.Probe.Operator.Is)
s += " is ";
else if (p.Oper == CIR.Probe.Operator.As)
s += " as ";
else
s += "UNHANDLED";
s += p.ProbeType;
return s;
}
string GetLocalVariableReference (LocalVariableReference l)
{
if (tag_values)
return "/* local var: */" + l.Name;
else
return l.Name;
}
string GetParameterReference (ParameterReference r)
{
if (tag_values)
return "/* par: */ " + r.Name;
else
return r.Name;
}
string GetExpression (Expression e, int paren_level)
{
if (e == null){
return "<NULL EXPRESSION>";
}
if (e is Unary)
return GetUnary ((Unary) e, paren_level);
else if (e is Binary)
return GetBinary ((Binary) e, paren_level);
else if (e is Cast)
return GetCast ((Cast) e);
else if (e is Conditional)
return GetConditional ((Conditional) e);
else if (e is SimpleName)
return GetSimpleName ((SimpleName)e);
else if (e is LocalVariableReference)
return GetLocalVariableReference ((LocalVariableReference) e);
else if (e is ParameterReference)
return GetParameterReference ((ParameterReference) e);
else if (e is Assign)
return GetAssign ((Assign) e);
else if (e is Literal)
return e.ToString ();
else if (e is Invocation)
return GetInvocation ((Invocation) e);
else if (e is New)
return GetNew ((New) e);
else if (e is This)
return "this";
else if (e is TypeOf)
return GetTypeOf ((TypeOf) e);
else if (e is SizeOf)
return GetSizeOf ((SizeOf) e);
else if (e is MemberAccess)
return GetMemberAccess ((MemberAccess) e);
else if (e is Probe)
return GetProbe ((Probe) e);
else
return "WARNING {" + e.ToString () + "} WARNING";
}
void GenerateParameters (Parameters pars)
{
Parameter [] pfixed;
Parameter parray;
pfixed = pars.FixedParameters;
if (pfixed != null){
for (int i = 0; i < pfixed.Length; i++){
output (GetParameter (pfixed [i]));
if (i+1 != pfixed.Length)
output (", ");
}
}
parray = pars.ArrayParameter;
if (parray != null){
output (GetParameter (parray));
}
}
void GenerateIf (If s)
{
bool do_indent;
output ("if (" + GetExpression (s.Expr, 0) + ") ");
do_indent = !(s.TrueStatement is Block);
if (do_indent)
indent++;
GenerateStatement (s.TrueStatement, true, false, false);
if (do_indent)
indent--;
if (s.FalseStatement != null){
ioutput ("else");
newline ();
GenerateStatement (s.FalseStatement, false, true, false);
}
}
void GenerateDo (Do s)
{
output ("do"); newline ();
indent++;
GenerateStatement (s.EmbeddedStatement, false, false, false);
indent--;
output (" while (" + GetExpression (s.Expr, 0) + ");");
newline ();
}
void GenerateWhile (While s)
{
output ("while (" + GetExpression (s.Expr, 0) + ")");
GenerateStatement (s.Statement, true, true, false);
}
void GenerateFor (For s)
{
output ("for (");
if (! (s.InitStatement == EmptyStatement.Value))
GenerateStatement (s.InitStatement, true, true, true);
output ("; ");
output (GetExpression (s.Test, 0));
output ("; ");
if (! (s.Increment == EmptyStatement.Value))
GenerateStatement (s.Increment, true, true, true);
output (") ");
GenerateStatement (s.Statement, true, true, false);
}
void GenerateReturn (Return s)
{
output ("return " +
(s.Expr != null ?
GetExpression (s.Expr, 0) : "" + ";") +
";");
newline ();
}
void GenerateGoto (Goto s)
{
output ("goto " + s.Target + ";");
newline ();
}
void GenerateThrow (Throw s)
{
}
void GenerateStatementExpression (StatementExpression s)
{
output (GetExpression (s.Expr, 0) + ";");
newline ();
}
void GenerateSwitchLabels (ArrayList labels)
{
foreach (SwitchLabel sl in labels){
Expression lab = sl.Label;
if (lab == null){
ioutput ("default:");
newline ();
} else {
ioutput ("case " + GetExpression (lab, 0) + ":");
newline ();
}
}
}
void GenerateSwitch (Switch s)
{
output_newline ("switch (" + GetExpression (s.Expr, 0) + ")");
foreach (SwitchSection ss in s.Sections){
GenerateSwitchLabels (ss.Labels);
GenerateBlock (ss.Block, false, false);
}
}
void GenerateChecked (Checked c)
{
output ("checked ");
GenerateBlock (c.Block, false, false);
}
void GenerateUnchecked (Unchecked c)
{
output ("unchecked ");
GenerateBlock (c.Block, false, false);
}
void GenerateCatchClauses (ArrayList list)
{
foreach (Catch c in list){
space ();
output ("catch ");
if (c.Type != null){
output ("(" + c.Type +
(c.Name != null ? " " + c.Name : "") + ")");
}
GenerateBlock (c.Block, false, false);
}
}
void GenerateTry (Try t)
{
output ("try");
GenerateBlock (t.Block, false, false);
if (t.Specific != null){
GenerateCatchClauses (t.Specific);
}
if (t.General != null){
space ();
output ("catch");
GenerateBlock (t.Block, false, false);
}
if (t.Fini != null){
GenerateBlock (t.Fini, false, false);
}
}
void GenerateStatement (Statement s, bool doPlacement, bool blockFlushesLine, bool embedded)
{
if (s == null){
output ("WARNING: got a null Statement");
newline ();
return;
}
if (doPlacement){
if (s is Block){
GenerateBlock ((Block) s, doPlacement, embedded);
return;
} else
newline ();
}
space ();
if (s is If)
GenerateIf ((If) s);
else if (s is Do)
GenerateDo ((Do) s);
else if (s is While)
GenerateWhile ((While) s);
else if (s is For)
GenerateFor ((For) s);
else if (s is Return)
GenerateReturn ((Return) s);
else if (s is Goto)
GenerateGoto ((Goto) s);
else if (s is Throw)
GenerateThrow ((Throw) s);
else if (s is Break)
output_newline ("break;");
else if (s is Continue)
output_newline ("continue;");
else if (s == EmptyStatement.Value)
output_newline ("/* empty statement */;");
else if (s is Block)
GenerateBlock ((Block) s, doPlacement, embedded);
else if (s is StatementExpression)
GenerateStatementExpression ((StatementExpression) s);
else if (s is Switch)
GenerateSwitch ((Switch) s);
else if (s is Checked)
GenerateChecked ((Checked) s);
else if (s is Unchecked)
GenerateUnchecked ((Unchecked) s);
else if (s is Try)
GenerateTry ((Try) s);
else {
System.Type t = s.GetType ();
output ("\n*****UNKNOWN Statement:" + t.ToString ());
}
}
//
// embedded is used only for things like the For thing
// that has blocks but for display purposes we want to keep
// without newlines.
void GenerateBlock (Block b, bool doPlacement, bool embedded)
{
if (b.Label != null)
output (b.Label + ":");
if (!b.Implicit){
if (!doPlacement)
space ();
output ("{");
if (!embedded)
newline ();
indent++;
}
if (b.Variables != null){
foreach (DictionaryEntry entry in b.Variables){
VariableInfo vi = (VariableInfo) entry.Value;
space ();
output_newline (
vi.Type + " " +
(string) entry.Key + ";");
}
newline ();
}
foreach (Statement s in b.Statements){
GenerateStatement (s, false, true, false);
}
if (!b.Implicit){
indent--;
ioutput ("}");
if (!embedded)
newline ();
}
}
void GenerateMethod (Method m)
{
ioutput (GetModifiers (m.ModFlags) +
m.ReturnType + " " +
m.Name + " (");
GenerateParameters (m.Parameters);
output_newline (")");
GenerateBlock (m.Block, false, false);
newline ();
}
void GenerateInterfaceMethod (InterfaceMethod imethod)
{
space ();
output (imethod.IsNew ? "new " : "");
output (imethod.ReturnType + " " + imethod.Name + " (");
GenerateParameters (imethod.Parameters);
output (");");
newline ();
}
void GenerateInterfaceProperty (InterfaceProperty iprop)
{
space ();
output (iprop.IsNew ? "new " : "");
output (iprop.Type + " " + iprop.Name + " { ");
if (iprop.HasGet) output ("get; ");
if (iprop.HasSet) output ("set; ");
output ("}");
newline ();
}
void GenerateInterfaceEvent (InterfaceEvent ievent)
{
space ();
output ((ievent.IsNew ? "new " : "") + "event ");
output (ievent.Type + " " + ievent.Name + ";");
newline ();
}
void GenerateInterfaceIndexer (InterfaceIndexer iindexer)
{
space ();
output (iindexer.IsNew ? "new " : "");
output (iindexer.Type + " this [");
output (iindexer.Parameters + "] {");
if (iindexer.HasGet) output ("get; ");
if (iindexer.HasSet) output ("set; ");
output ("}");
newline ();
}
string GenIfaceBases (Interface iface)
{
return GenBases (iface.Bases);
}
void GenerateInterface (Interface iface)
{
ioutput (GetModifiers (iface.ModFlags) + "interface " +
ClassName (iface.Name) + GenIfaceBases (iface) + " {");
newline ();
indent++;
if (iface.InterfaceMethods != null){
foreach (DictionaryEntry de in iface.InterfaceMethods){
InterfaceMethod method = (InterfaceMethod) de.Value;
GenerateInterfaceMethod (method);
}
}
if (iface.InterfaceProperties != null){
foreach (DictionaryEntry de in iface.InterfaceProperties){
InterfaceProperty iprop = (InterfaceProperty) de.Value;
GenerateInterfaceProperty (iprop);
}
}
if (iface.InterfaceEvents != null){
foreach (DictionaryEntry de in iface.InterfaceEvents){
InterfaceEvent ievent = (InterfaceEvent) de.Value;
GenerateInterfaceEvent (ievent);
}
}
if (iface.InterfaceIndexers != null){
foreach (DictionaryEntry de in iface.InterfaceIndexers){
InterfaceIndexer iindexer = (InterfaceIndexer) de.Value;
GenerateInterfaceIndexer (iindexer);
}
}
indent--;
ioutput ("}");
newline ();
newline ();
}
void GenerateField (Field f)
{
space ();
output (GetModifiers (f.ModFlags) +
f.Type + " " + f.Name);
if (f.Initializer != null){
if (f.Initializer is Expression)
output (" = " + GetExpression ((Expression) f.Initializer, 0));
else
output ("ADD SUPPORT FOR ARRAYS");
}
output (";");
newline ();
}
void GenerateConstructor (Constructor c)
{
ConstructorInitializer init = c.Initializer;
space ();
output (GetModifiers (c.ModFlags) + c.Name + " (");
GenerateParameters (c.Parameters);
output (")");
if (init != null){
if (init is ConstructorThisInitializer)
output (": this (");
else
output (": base (");
output (GetArguments (init.Arguments));
output (")");
}
newline ();
GenerateBlock (c.Block, false, false);
}
void GenerateProperty (Property prop)
{
space ();
output (GetModifiers (prop.ModFlags) + prop.Type +
" " + prop.Name + " {");
newline ();
indent++;
if (prop.Get != null){
space ();
output ("get ");
GenerateBlock (prop.Get, false, false);
newline ();
}
if (prop.Set != null){
space ();
output ("set ");
GenerateBlock (prop.Set, false, false);
}
indent--;
space ();
output ("}");
newline ();
}
void GenerateEnum (CIR.Enum e)
{
space ();
output ("enum " + e.Name + " {");
newline ();
indent++;
foreach (string name in e.ValueNames){
Expression expr = e [name];
space ();
output (name);
if (expr != null)
output (" = " + GetExpression (expr, 0));
output (",");
newline ();
}
indent--;
space ();
output_newline ("}");
}
void GenerateTypeContainerData (TypeContainer tc)
{
if (tc.Constants != null){
foreach (Constant c in tc.Constants){
space ();
output ("const " + c.ConstantType + " " + c.Name + " = " +
GetExpression (c.Expr, 0) + ";");
newline ();
}
newline ();
}
if (tc.Enums != null){
foreach (CIR.Enum e in tc.Enums)
GenerateEnum (e);
}
if (tc.Fields != null){
foreach (Field f in tc.Fields)
GenerateField (f);
newline ();
}
if (tc.Constructors != null){
foreach (Constructor c in tc.Constructors)
GenerateConstructor (c);
newline ();
}
if (tc.Properties != null){
foreach (Property prop in tc.Properties)
GenerateProperty (prop);
}
GenerateFromTypes (tc);
if (tc.Methods != null){
foreach (Method m in tc.Methods){
GenerateMethod (m);
}
}
}
string GetModifiers (int mod_flags)
{
string s = "";
for (int i = 1; i <= (int) CIR.Modifiers.TOP; i <<= 1){
if ((mod_flags & i) != 0)
s += Modifiers.Name (i) + " ";
}
return s;
}
string ClassName (string name)
{
return name;
//return name.Substring (1 + name.LastIndexOf ('.'));
}
string GenBases (ArrayList bases)
{
if (bases == null)
return "";
string res = ": ";
int top = bases.Count;
for (int i = 0; i < bases.Count; i++){
Type t = (Type) bases [i];
res += t.Name;
if (i + 1 != top)
res += ", ";
}
return res;
}
string GenClassBases (Class c)
{
return GenBases (c.Bases);
}
void GenerateFromClass (Class c)
{
ioutput (GetModifiers (c.ModFlags) + "class " + ClassName (c.Name) +
" " + GenClassBases (c) + " {");
newline ();
indent++;
GenerateTypeContainerData (c);
indent--;
ioutput ("}");
newline ();
newline ();
}
void GenerateFromStruct (Struct s)
{
GenerateTypeContainerData (s);
}
void GenerateFromTypes (TypeContainer types)
{
if (types.Types == null)
return;
foreach (DictionaryEntry de in types.Types){
TypeContainer type = (TypeContainer) de.Value;
if (type is Class)
GenerateFromClass ((Class) type);
if (type is Struct)
GenerateFromStruct ((Struct) type);
}
if (types.Interfaces != null){
foreach (DictionaryEntry de in types.Interfaces){
Interface iface = (Interface) de.Value;
GenerateInterface (iface);
}
}
}
public int Dump (Tree tree, StreamWriter output)
{
this.o = output;
indent = 0;
GenerateFromTypes (tree.Types);
return 0;
}
public void ParseOptions (string options)
{
if (options == "tag")
tag_values = true;
}
}
}
-3090
View File
File diff suppressed because it is too large. Load diff
Loaded 100 of 4252 files, more files were not shown because too many files have changed in this diff. Show more