124 Commits
Author SHA1 Message Date
Gert Driesen fe32d6af83 * CodeGeneratorFromExpressionTest.cs: Added test for
CodeParameterDeclarationExpression.
* CodeGeneratorFromTypeTest.cs: Modified tests to check result
for zero-length event, field and parameter name.
* CodeGeneratorFromStatementTest.cs: Added CodeCommentStatement,
CodeThrowExceptionStatement, CodeGotoStatement and
CodeTryCatchFinallyStatement tests.
* CodeGeneratorFromTypeTestBase.cs: Modified GetMethodMembersType3 to
add parameter with no name.
* CodeGeneratorTestBase.cs: Removed Code property, added Generate
overload taking CodeGeneratorOptions, added NewLine property.
* CodeGeneratorCompileUnitTest.cs: Use Generate method instead of
Code property.
* CodeGeneratorFromExpressionTest.cs: Added test for
CodeParameterDeclarationExpression.
* CodeGeneratorFromTypeTest.cs: Added tests for __exception name that
is output for zero-length field, event and parameter name in 2.0
profile.
* CodeGeneratorFromStatementTest.cs: Added.
* CSharpCodeGenerator.cs: Fixed GenerateComment to also write
comment chars for carriage-return (and skip linefeed, if its the
next character). Fixed output for TryCatchFinallyStatement. Fixed
GotoStatement to end with newline.
* VBCodeGenerator.cs: Fixed NullReferenceException if no ToThrow
expression is set for CodeThrowExceptionStatement. Fixed
GenerateComment to output comment chars for carriage-returns and
linefeed characters. Modified code generated for
CodeTryCatchFinallyStatement to match MS.NET. Fixed code generated
for CodeGotoStatement to match MS.NET. On 2.0 profile, output
"__exception" if name is zero-length string in OutputTypeNamePair.

svn path=/trunk/mcs/; revision=53506
2005-11-26 16:23:45 +00:00
Sebastien Pouliot f0b8c46803 oops forgot to save the ChangeLog before committing...
svn path=/trunk/mcs/; revision=52590
2005-11-04 18:46:14 +00:00
Sebastien Pouliot 44849fdd47 svn path=/trunk/mcs/; revision=52583 2005-11-04 16:27:15 +00:00
Sebastien Pouliot ec1dca6f61 2005-11-02 Sebastien Pouliot <[email protected]>
* Executor.cs: Reworked (for permissions) and fixed ExitCode (must be 
	called before Close).


svn path=/trunk/mcs/; revision=52477
2005-11-02 16:17:52 +00:00
Sebastien Pouliot aa31ebd7da 2005-11-01 Sebastien Pouliot <[email protected]>
* CodeGenerator.cs: Added/stubbed missing 2.0 stuff.


svn path=/trunk/mcs/; revision=52457
2005-11-01 20:06:17 +00:00
Sebastien Pouliot 6051cfedb5 2005-11-01 Sebastien Pouliot <[email protected]>
CodeDomProvider.cs: Added missing 2.0 methods. Added CAS permissions.
	Added protection against NullReferenceException when no config is
	available.


svn path=/trunk/mcs/; revision=52446
2005-11-01 15:27:56 +00:00
Sebastien Pouliot 9f47927748 2005-10-29 Sebastien Pouliot <[email protected]>
CodeDomProvider.cs: Stubbed a few 2.0 methods to fix API errors in 
	derived classes.


svn path=/trunk/mcs/; revision=52376
2005-10-29 13:56:34 +00:00
Sebastien Pouliot 490fcf25a6 2005-10-25 Sebastien Pouliot <[email protected]>
* CompilerError.cs: Added LinkDemand for Unrestricted before 2.0.
	* CompilerErrorCollection.cs: Added LinkDemand for Unrestricted before
	2.0.


svn path=/trunk/mcs/; revision=52195
2005-10-25 18:06:07 +00:00
Sebastien Pouliot b1e7b9d210 2005-10-25 Sebastien Pouliot <[email protected]>
* CodeGenerator.cs: Fixed OutputAttributeArgument not to assume the
	default value is null (it's String.Empty).


svn path=/trunk/mcs/; revision=52185
2005-10-25 15:51:22 +00:00
Sebastien Pouliot 5ac70cd072 2005-10-25 Sebastien Pouliot <[email protected]>
* CompilerParameters.cs: Added [ComVisible(false)] on the new (2.0)
	EmbeddedResources and LinkedResources properties.
	* TempFileCollection.cs: Changed BasePath property to use Path.
	GetTempPath (Environment check) and added the PathDiscovery check on
	the combined result. Fixed TempDir so it's value never change (i.e. 
	imply that it doesn't need any permissions). Fixed SyncRoot to always 
	return null.


svn path=/trunk/mcs/; revision=52181
2005-10-25 14:31:18 +00:00
Sebastien Pouliot b8cacc11d6 2005-10-24 Sebastien Pouliot <[email protected]>
* CodeGeneratorOptions.cs: Fixed how properties are kept inside the
	IDictionary (which is just like System.Web.dll).
	* CompilerError.cs: Added [Serializable] attribute for 2.0.
	* CompilerInfo.cs: Added LinkDemand for Unrestricted. Stubbed new 
	(2.0) CreateDefaultCompilerParameters method.
	* CompilerParameters.cs: Added LinkDemand and InheritanceDemand for
	Unrestricted. Added Demand for ControlEvidence to Evidence property.
	Added new (2.0) EmbeddedResources and LinkedResources properties.
	* CompilerResults.cs: Added LinkDemand and InheritanceDemand for 
	Unrestricted. Added Demand for ControlEvidence to Evidence property.
	* Executor.cs: Added LinkDemand for Unrestricted. Added support for 
	userToken (impersonation).
	* GeneratedCodeAttribute.cs: New. 2.0 attribute for code generated by 
	tools.
	* IndentedTextWriter.cs: Added LinkDemand and InheritanceDemand for 
	Unrestricted.


svn path=/trunk/mcs/; revision=52159
2005-10-25 00:59:32 +00:00
Sebastien Pouliot c4ddcc8aa8 2005-10-04 Sebastien Pouliot <[email protected]>
* TempFileCollection.cs: Added a call to GC.SuppressFinalize in 
	Dispose.


svn path=/trunk/mcs/; revision=51229
2005-10-04 23:32:44 +00:00
Gert Driesen 2ae96ccc57 * CodeGeneratorFromTypeTest.cs: Added NewSlot tests.
* CSharpCodeGenerator.cs: Fixed code generated for NewSlot members.
* CodeGeneratorFromTypeTestBase.cs: Added NewSlot tests.
* CodeGenerator.cs: In OutputMemberScopeModifier, only output "new" modifier 
in 2.0 profile.
* VBCodeGenerator.cs: Fixed code generated for NewSlot members.

svn path=/trunk/mcs/; revision=47859
2005-07-30 16:27:36 +00:00
Gert Driesen cafc6003d6 * CodeGeneratorFromTypeTest.cs: Added BaseTypes and TypeConstructor
tests. Added enum, interface and delegate tests.
* CodeTypeDelegateTest.cs: Added tests for BaseTypes and ReturnType.
* CodeGeneratorTest.cs: Removed duplicate import of NUNit.Framework namespace.
* CodeGeneratorFromTypeTestBase.cs: Added BaseTypes and TypeConstructor tests.
* CodeGeneratorFromTypeTest.cs: Added BaseTypes and TypeConstructor
tests. Enabled enum, interface and delegate tests.
* CSharpCodeGenerator.cs: Fixed generated code for enums, interfaces
and delegates to match MS.NET.
* CodeTypeReference.cs: Added internal IsInterface property.
* CodeTypeDelegate.cs: System.Delegate is base type, and make sure
ReturnType is initialized.
* System_test.dll.sources: Added CodeTypeDelegateTest.cs from System.CodeDom.
* CodeGenerator.cs: Threat delegates like any other type.
* VBCodeGenerator.cs: Fixed generated code for enums, interfaces and
delegates to match MS.NET.

svn path=/trunk/mcs/; revision=47604
2005-07-24 12:19:26 +00:00
Gert Driesen 16b04eb9a6 * CodeGeneratorTest.cs: Added unit tests for CodeGenerator.IsCurrent*.
* System_test.dll.sources: Added CodeGeneratorTest.cs from 
System.CodeDom.Compiler.
* CodeGenerator.cs: Fixed IsCurrentClass to return false for delegate.

svn path=/trunk/mcs/; revision=47500
2005-07-21 09:33:05 +00:00
Gert Driesen a5b5581b4d * CodeGeneratorFromTypeTest.cs: Added additional property tests.
* CodeGenerator.cs: On 2.0 profile, internal members are also marked
virtual. Fixed access modifier for FamilyAndAssembly to match MS.NET.

svn path=/trunk/mcs/; revision=46671
2005-06-28 20:27:55 +00:00
Ben Maurer b27c8e1534 remove .cvsignore from everywhere, as it is useless on svn
svn path=/trunk/mcs/; revision=46564
2005-06-27 15:55:58 +00:00
Ben Maurer a68aa2eda4 remove executable bit from changelogs
svn path=/trunk/mcs/; revision=46563
2005-06-27 15:53:16 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Gert Driesen a8612121ed * CodeGenerator.cs: Removed debug code (for other fix), fixed line endings
svn path=/trunk/mcs/; revision=46495
2005-06-25 15:29:09 +00:00
Gert Driesen 4f410a76b4 * CodeGeneratorFromCompileUnitTest.cs: enabled test for bug #75190.
* CodeGenerator.cs: Fixed bug #75190, GenerateCodeFromCompileUnit generates
no code for CodeSnippetCompileUnit.

svn path=/trunk/mcs/; revision=46494
2005-06-25 15:26:38 +00:00
Gert Driesen f3f823c46a * IndentedTextWriter.cs: also output tabs in WriteLine () to match MS.NET.
svn path=/trunk/mcs/; revision=45401
2005-06-04 13:55:23 +00:00
Gonzalo Paniagua Javier 56ef8262ac more
svn path=/trunk/mcs/; revision=40837
2005-02-18 00:54:05 +00:00
Gonzalo Paniagua Javier 55aaff2a24 build fix
svn path=/trunk/mcs/; revision=40835
2005-02-17 22:42:20 +00:00
Gonzalo Paniagua Javier 5e04df3d2f 2005-02-17 Gonzalo Paniagua Javier <[email protected]>
* System.dll.sources: added CodeDomConfigurationHandler.
	* System.CodeDom.Compiler/CodeDomProvider.cs: implemented IsDefined* and
	GetCompilerInfo.
	* System.CodeDom.Compiler/CompilerInfo.cs: implemented.
	* System.CodeDom.Compiler/CodeDomConfigurationHandler.cs: system.codedom
	section reader.


svn path=/trunk/mcs/; revision=40814
2005-02-17 17:46:55 +00:00
Lluis Sanchez 567ff42c08 2005-01-27 LLuis Sanchez Gual <[email protected]>
* CodeGenerator.cs: Write 'f' suffix for float constants.


svn path=/trunk/mcs/; revision=39666
2005-01-27 22:08:11 +00:00
Raja R Harinath 97553bb62e cvs ignores, sorry about the spam
svn path=/trunk/mcs/; revision=33874
2004-09-14 09:59:51 +00:00
Marek Safar 5d46b79756 2004-09-06 Marek Safar <[email protected]>
* CodeCompileUnit.cs,
	* CodeMemberMethod.cs,
	* CodeMethodReferenceExpression.cs,
	* CodeStatement.cs,
	* CodeTypeDeclaration.cs,
	* CodeTypeMember.cs,
	* CodeTypeReference.cs : Implemented NET_2_0.

	* CodeChecksumPragma.cs,
	* CodeDirective.cs,
	* CodeDirectiveCollection.cs,
	* CodeRegionDirective.cs,
	* CodeRegionMode.cs,
	* CodeTypeParameter.cs,
	* CodeTypeParameterCollection.cs,
	* CodeTypeReferenceOptions.cs : New NET_2_0 files

svn path=/trunk/mcs/; revision=33419
2004-09-06 16:32:53 +00:00
Marek Safar fb98c02600 I fixed mono CodeDom bugs to pass on the latest Microsoft CodeDom Test Suite.
svn path=/trunk/mcs/; revision=33172
2004-09-01 18:45:52 +00:00
Atsushi Eno 1c4f8a680a 2004-08-09 Atsushi Enomoto <[email protected]>
* CodeGenerator.cs :
	  Don't initialize output more than once. TextWriter is wrapped twice.

svn path=/trunk/mcs/; revision=32088
2004-08-09 17:24:51 +00:00
Atsushi Eno c539cf49a2 2004-07-15 Peter Williams <[email protected]>
* CodeGenerator.cs: Have the basic generator create line pragmas
	for NamespaceImports, SnippetCompileUnits, and TypeMembers, all of
	which had LinePragma members which were going unused.

svn path=/trunk/mcs/; revision=31213
2004-07-16 10:03:56 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Jackson Harper 13bd73bd49 * CompilerError.cs:
* CodeGenerator.cs: Make sure we are using invariant for non
	culture sensitive operations.

svn path=/trunk/mcs/; revision=29807
2004-06-17 19:27:12 +00:00
Jackson Harper 9fcdd687af * CodeGenerator.cs: Make sure we are using invariant for non
culture sensitive operations.

svn path=/trunk/mcs/; revision=29806
2004-06-17 19:11:43 +00:00
Gert Driesen 24b7baffa1 * IndentedTextWriter.cs: have DefaultTabString correspond with
MS.NET (meaning four spaces)

svn path=/trunk/mcs/; revision=29457
2004-06-13 19:00:26 +00:00
Gonzalo Paniagua Javier db9292e4b5 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* TempFileCollection.cs: don't create a Random object on every call to
	BasePath.

svn path=/trunk/mcs/; revision=27328
2004-05-14 02:30:31 +00:00
Atsushi Eno b666e8ec01 2004-04-26 Atsushi Enomoto <[email protected]>
* CodeGenerator.cs : delegate was output as usual class.

svn path=/trunk/mcs/; revision=25986
2004-04-26 08:36:24 +00:00
Lluis Sanchez ff071e16b9 * Executor.cs: Implemented.
svn path=/trunk/mcs/; revision=24723
2004-03-29 17:56:19 +00:00
Gonzalo Paniagua Javier 492d674325 2004-02-17 Gonzalo Paniagua Javier <[email protected]>
* TempFileCollection.cs: fixed typo in Delete. Closes bug #54443.

svn path=/trunk/mcs/; revision=23154
2004-02-17 02:03:06 +00:00
Jackson Harper 6779183017 * CompilerParameters.cs: TempFiles should never return
null.

svn path=/trunk/mcs/; revision=22952
2004-02-10 19:59:54 +00:00
Jackson Harper d63d8d1ee8 * CodeGenerator.cs (GenerateExpression): Don't allow null
expressions. Throw ArgumentException if the expression type is not
	handled.
	* CodeGenerator.cs (GenerateStatement): Add line pragmas if they
	are set. Throw ArgumentException if the expression type is not
	handled.

svn path=/trunk/mcs/; revision=22776
2004-02-04 23:44:11 +00:00
Gonzalo Paniagua Javier 8c74b14758 2003-12-12 Gonzalo Paniagua Javier <[email protected]>
* TempFileCollection.cs: fixed temp path in BaseDir.

svn path=/trunk/mcs/; revision=21060
2003-12-12 07:18:15 +00:00
Gonzalo Paniagua Javier 5e99ee75fe 2003-11-21 Gonzalo Paniagua Javier <[email protected]>
* System.CodeDom.Compiler/CodeGenerator.cs: fixed assembly level
	attribute generation.

	* Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs: don't
	compare whitespace for assembly level attribute.

svn path=/trunk/mcs/; revision=20292
2003-11-21 00:26:33 +00:00
Lluis Sanchez db6f616b5b * CodeGenerator.cs: When sorting the members of a type, keep the relative
order of the members of the same kind.

svn path=/trunk/mcs/; revision=17193
2003-08-08 17:14:13 +00:00
Lluis Sanchez 531c57df8e * CodeGenerator.cs: Generate comments for properties and fields.
Write a line separator between type declarations.

svn path=/trunk/mcs/; revision=17070
2003-08-05 15:46:57 +00:00
Andreas N fd1549e5ea 2003-07-10 Andreas Nahr <[email protected]>
* Executor.cs: Changed abstract to sealed

svn path=/trunk/mcs/; revision=16107
2003-07-10 16:56:19 +00:00
Andreas N b6687f8951 2003-07-07 Andreas Nahr <[email protected]>
* CodeDomProvider.cs: Removed unneccesary attribute according to corecompare
	* Executor.cs: Fixed signature with ref calls according to corecompare and made neccessary changes

svn path=/trunk/mcs/; revision=16008
2003-07-07 11:00:51 +00:00
Andreas N ac4949c4b8 2003-06-20 Andreas Nahr <[email protected]>
* CompilerOptions.cs: Deleted this file (such a class does not exist)

svn path=/trunk/mcs/; revision=15993
2003-07-06 21:57:42 +00:00
Andreas N 133bb5f987 2003-06-20 Andreas Nahr <[email protected]>
* CodeCompiler.cs: Nearly completely implemented
	* CodeDomProvider.cs: Added missing Attribute, restyled according to style guidelines
	* CodeGenerator.cs: Fixed visibilies, added missing members, implemented members, stubbed out missing member, restyled according to style guidelines
	* CodeParser.cs: Added and implemented (ok no real implementation needed ;)
	* CompilerErrorCollection.cs: Removed unneeded MonoTODOs, restyled according to style guidelines
	* CompilerParameters.cs: Fixed wrong properties, Added Initializers, restyled according to style guidelines
	* CompilerResults.cs: Added Evidence property, added initial values
	* Executor.cs: Added and partially implemented (should probably be used by CodeCompiler)

	* CompilerOptions.cs: Deleted this file (such a class does not exist)

svn path=/trunk/mcs/; revision=15992
2003-07-06 21:55:32 +00:00
Gonzalo Paniagua Javier 319381dcf4 forgot this one
svn path=/trunk/mcs/; revision=14808
2003-05-22 18:05:08 +00:00