Author: peterw
Date: 2006-07-18 23:51:30 -0400 (Tue, 18 Jul 2006)
New Revision: 62725
Modified:
trunk/mbuild/ChangeLog
trunk/mbuild/Languages.CSharp.bundle
trunk/mbuild/Languages.CrappyC.bundle
trunk/mbuild/MBuildDynamic.Core/ChangeLog
trunk/mbuild/MBuildDynamic.Core/Core.Clr.bundle
trunk/mbuild/MBuildDynamic.Core/Core.Native.bundle
trunk/mbuild/MBuildDynamic.Core/Core.bundle
trunk/mbuild/Tools.Monodoc.bundle
trunk/mbuild/Tools.PkgConfig.bundle
trunk/mbuild/mb-bundlegen/ChangeLog
trunk/mbuild/mb-bundlegen/Parser.jay
trunk/mbuild/mb-bundlegen/ParserHelper.cs
trunk/mbuild/mb-bundlegen/Tokenizer.cs
Log:
mb-bundlegen:
2006-07-18 Peter Williams <[EMAIL PROTECTED]>
* Parser.jay: Remove the unused 'dictitem' and superfluous 'field'
tokens.
* Tokenizer.cs: Remove the dictitem and field tokens.
* ParserHelper.cs: Remove AddResultDictitem as it was unused.
topsrcdir:
2006-07-18 Peter Williams <[EMAIL PROTECTED]>
* *.bundle: Remove 'field' keywords.
MBuildDynamic.Core:
2006-07-18 Peter Williams <[EMAIL PROTECTED]>
* *.bundle: Remove 'field' keywords.
Modified: trunk/mbuild/ChangeLog
===================================================================
--- trunk/mbuild/ChangeLog 2006-07-19 03:41:02 UTC (rev 62724)
+++ trunk/mbuild/ChangeLog 2006-07-19 03:51:30 UTC (rev 62725)
@@ -1,5 +1,9 @@
2006-07-18 Peter Williams <[EMAIL PROTECTED]>
+ * *.bundle: Remove 'field' keywords.
+
+2006-07-18 Peter Williams <[EMAIL PROTECTED]>
+
* Tools.GLibGenmarshal.bundle: Migrate to the new preconstructed-results
model: add arguments to the build functions, add 'default restype' and
'restype @{}@' code where appropriate, change construction-type
Modified: trunk/mbuild/Languages.CSharp.bundle
===================================================================
--- trunk/mbuild/Languages.CSharp.bundle 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/Languages.CSharp.bundle 2006-07-19 03:51:30 UTC (rev
62725)
@@ -44,9 +44,9 @@
# CSharpCompilerOutput
result CSharpCompilerOutput : CompositeResult {
- default field AssemblyFile Output;
- field MBFile DebugInfo;
- field AssemblyConfigFile Config;
+ default AssemblyFile Output;
+ MBFile DebugInfo;
+ AssemblyConfigFile Config;
}
# CSharpCompilerOutputInstaller
@@ -98,9 +98,9 @@
# CSharpCompiler
result CSharpCompiler : CompositeResult {
- field BinaryInfo Binary;
- field string NativeArgs;
- field bool McsDebugInfo;
+ BinaryInfo Binary;
+ string NativeArgs;
+ bool McsDebugInfo;
@{
@@ -278,12 +278,12 @@
# CSharpCompilerOptions
result CSharpCompilerOptions : CompositeResult {
- field bool Debug;
- field bool Unsafe;
- field StrongnameKeypairFile SnkFile;
- field string NativeArgs;
- field string SuppressedWarnings; # FIXME: kind of hacky
- field MBDictionary Defines; # FIXME: this too
+ bool Debug;
+ bool Unsafe;
+ StrongnameKeypairFile SnkFile;
+ string NativeArgs;
+ string SuppressedWarnings; # FIXME: kind of hacky
+ MBDictionary Defines; # FIXME: this too
# FIXME: refs, sysrefs, resources -- arrays in dicts
Modified: trunk/mbuild/Languages.CrappyC.bundle
===================================================================
--- trunk/mbuild/Languages.CrappyC.bundle 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/Languages.CrappyC.bundle 2006-07-19 03:51:30 UTC (rev
62725)
@@ -53,7 +53,7 @@
# hypothetical CCOutput, based on CSharpCompilerOutput
#
#result CCOutput : CompositeResult {
- # default field NativeCodeFile Output;
+ # default NativeCodeFile Output;
#}
# CCOutputInstaller
@@ -176,10 +176,10 @@
# CCompiler
result CCompiler : CompositeResult {
- field BinaryInfo Binary;
- field string NativeArgs;
- field ArchKindResult TargetArch;
- field NativeNamingConfiguration TargetNaming;
+ BinaryInfo Binary;
+ string NativeArgs;
+ ArchKindResult TargetArch;
+ NativeNamingConfiguration TargetNaming;
@{
@@ -319,10 +319,10 @@
# CCOptions
result CCOptions : CompositeResult {
- field bool Debug;
- field string NativeArgs;
- field MBDictionary Definitions;
- field CCOptimizerFlagsResult Optimizations;
+ bool Debug;
+ string NativeArgs;
+ MBDictionary Definitions;
+ CCOptimizerFlagsResult Optimizations;
@{
Modified: trunk/mbuild/MBuildDynamic.Core/ChangeLog
===================================================================
--- trunk/mbuild/MBuildDynamic.Core/ChangeLog 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/MBuildDynamic.Core/ChangeLog 2006-07-19 03:51:30 UTC (rev
62725)
@@ -1,5 +1,9 @@
2006-07-18 Peter Williams <[EMAIL PROTECTED]>
+ * *.bundle: Remove 'field' keywords.
+
+2006-07-18 Peter Williams <[EMAIL PROTECTED]>
+
* Core.bundle (Switch): Of course. Preconstructed results fundamentally
don't work with Switch. Use the new 'manual build' syntax to avoid this
problem.
Modified: trunk/mbuild/MBuildDynamic.Core/Core.Clr.bundle
===================================================================
--- trunk/mbuild/MBuildDynamic.Core/Core.Clr.bundle 2006-07-19 03:41:02 UTC
(rev 62724)
+++ trunk/mbuild/MBuildDynamic.Core/Core.Clr.bundle 2006-07-19 03:51:30 UTC
(rev 62725)
@@ -45,7 +45,7 @@
}
result StrongnameProgram : CompositeResult {
- field BinaryInfo Program;
+ BinaryInfo Program;
@{
@@ -71,7 +71,7 @@
}
result GacutilProgram : CompositeResult {
- field BinaryInfo Program;
+ BinaryInfo Program;
# TODO: see if gacutil supports /package
@@ -120,9 +120,9 @@
implements IResultInstaller;
- field GacutilProgram Gacutil;
- field string RootDir;
- field string Package;
+ GacutilProgram Gacutil;
+ string RootDir;
+ string Package;
@{
Modified: trunk/mbuild/MBuildDynamic.Core/Core.Native.bundle
===================================================================
--- trunk/mbuild/MBuildDynamic.Core/Core.Native.bundle 2006-07-19 03:41:02 UTC
(rev 62724)
+++ trunk/mbuild/MBuildDynamic.Core/Core.Native.bundle 2006-07-19 03:51:30 UTC
(rev 62725)
@@ -50,21 +50,21 @@
# Architecture handling
result Architecture : CompositeResult {
- field string CPU;
- field string Manufacturer;
- field string Kernel;
- field string OS;
+ string CPU;
+ string Manufacturer;
+ string Kernel;
+ string OS;
# this is the name of the system type as given by the user. We are
# supposed to present this to the user and use it when searching
# for cross-compiler type tools; eg, we search for "Alias-gcc",
# not "cpu-manu-kernel-os-gcc".
- field string Alias;
+ string Alias;
# this feels a little gross, but it seems necessary
- field ArchKindResult Kind;
+ ArchKindResult Kind;
@{
@@ -157,8 +157,8 @@
# Native code handling
result NativeCodeFile : CompositeResult {
- default field BinFile File;
- field ArchKindResult Architecture;
+ default BinFile File;
+ ArchKindResult Architecture;
@{
@@ -241,9 +241,9 @@
# Also, maybe it is time to implement an MBInteger result.
result NativeShlibVersion : CompositeResult {
- field string Major;
- field string Minor;
- field string Micro;
+ string Major;
+ string Minor;
+ string Micro;
@{
@@ -302,7 +302,7 @@
}
result NativeSharedLibrary : NativeLinkableFile {
- field NativeShlibVersion Version;
+ NativeShlibVersion Version;
@{
public NativeSharedLibrary (ArchKind k) : base (k)
@@ -357,12 +357,12 @@
}
result NativeNamingConfiguration : CompositeResult {
- field string shlib_pfx;
- field string shlib_sfx;
- field string prog_pfx;
- field string prog_sfx;
- field string module_pfx;
- field string module_sfx;
+ string shlib_pfx;
+ string shlib_sfx;
+ string prog_pfx;
+ string prog_sfx;
+ string module_pfx;
+ string module_sfx;
@{
Modified: trunk/mbuild/MBuildDynamic.Core/Core.bundle
===================================================================
--- trunk/mbuild/MBuildDynamic.Core/Core.bundle 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/MBuildDynamic.Core/Core.bundle 2006-07-19 03:51:30 UTC (rev
62725)
@@ -71,8 +71,8 @@
# Better place to land this?
result InterpreterBinaryInfo : BinaryInfo {
- field MBFile Program;
- field BinaryInfo Runtime;
+ MBFile Program;
+ BinaryInfo Runtime;
@{
Modified: trunk/mbuild/Tools.Monodoc.bundle
===================================================================
--- trunk/mbuild/Tools.Monodoc.bundle 2006-07-19 03:41:02 UTC (rev 62724)
+++ trunk/mbuild/Tools.Monodoc.bundle 2006-07-19 03:51:30 UTC (rev 62725)
@@ -43,7 +43,7 @@
result MDAssemblerProgram : CompositeResult {
- field BinaryInfo Binary;
+ BinaryInfo Binary;
@{
@@ -83,10 +83,10 @@
}
result MonodocFiles : CompositeResult {
- field BinFile ZipFile;
- field BinFile TreeFile;
- field string ProviderKind;
- field string NodePath;
+ BinFile ZipFile;
+ BinFile TreeFile;
+ string ProviderKind;
+ string NodePath;
}
result MonodocFilesInstaller : CopyInstaller {
Modified: trunk/mbuild/Tools.PkgConfig.bundle
===================================================================
--- trunk/mbuild/Tools.PkgConfig.bundle 2006-07-19 03:41:02 UTC (rev 62724)
+++ trunk/mbuild/Tools.PkgConfig.bundle 2006-07-19 03:51:30 UTC (rev 62725)
@@ -109,8 +109,8 @@
}
result PkgConfigInfo : CompositeResult {
- field string CFlags;
- field string Libs;
+ string CFlags;
+ string Libs;
}
rule PkgConfig : PkgConfigBase {
Modified: trunk/mbuild/mb-bundlegen/ChangeLog
===================================================================
--- trunk/mbuild/mb-bundlegen/ChangeLog 2006-07-19 03:41:02 UTC (rev 62724)
+++ trunk/mbuild/mb-bundlegen/ChangeLog 2006-07-19 03:51:30 UTC (rev 62725)
@@ -1,5 +1,14 @@
2006-07-18 Peter Williams <[EMAIL PROTECTED]>
+ * Parser.jay: Remove the unused 'dictitem' and superfluous 'field'
+ tokens.
+
+ * Tokenizer.cs: Remove the dictitem and field tokens.
+
+ * ParserHelper.cs: Remove AddResultDictitem as it was unused.
+
+2006-07-18 Peter Williams <[EMAIL PROTECTED]>
+
* Parser.jay: Add a way to specify 'manual' build functions, which
don't take a preconstructed result argument. Sometimes this is needed.
Modified: trunk/mbuild/mb-bundlegen/Parser.jay
===================================================================
--- trunk/mbuild/mb-bundlegen/Parser.jay 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/mb-bundlegen/Parser.jay 2006-07-19 03:51:30 UTC (rev
62725)
@@ -93,9 +93,7 @@
%token SOURCEFILE
%token TAGS
%token ABSTRACT
-%token DICTITEM
%token ORDERED
-%token FIELD
%token ENUM
%token RESTYPE
@@ -229,26 +227,14 @@
in_result_statement
: native_member
| implements_statement
- | dictitem_declaration
| field_declaration
;
-dictitem_declaration
- : DICTITEM classname IDENTIFIER SEMICOLON
- {
- string name = (string) $3;
- string key = ph.CurType.Name + "::" + name;
- string klass = (string) $2;
-
- ph.AddResultDictitem (key, klass, name);
- }
- ;
-
field_declaration
- : opt_default_kw FIELD classname IDENTIFIER SEMICOLON
+ : opt_default_kw classname IDENTIFIER SEMICOLON
{
- string name = (string) $4;
- string klass = (string) $3;
+ string klass = (string) $2;
+ string name = (string) $3;
bool want_default = (bool) $1;
ph.AddResultField (klass, name, want_default);
Modified: trunk/mbuild/mb-bundlegen/ParserHelper.cs
===================================================================
--- trunk/mbuild/mb-bundlegen/ParserHelper.cs 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/mb-bundlegen/ParserHelper.cs 2006-07-19 03:51:30 UTC (rev
62725)
@@ -471,74 +471,8 @@
return stmt;
}
- // Dictionary items
+ // Composite result fields.
- public void AddResultDictitem (string key, string klass, string name)
- {
- CodeLinePragma line = lexer.LinePragma;
-
- if (dict_hashtext == null)
- dict_hashtext = new StringBuilder ();
- dict_hashtext.AppendFormat ("{0}/{1},", key, klass);
-
- CodeMemberProperty p = new CodeMemberProperty ();
- p.Name = name;
- p.Attributes = MemberAttributes.Public;
- p.LinePragma = line;
- p.HasGet = true;
- p.HasSet = true;
- p.Type = new CodeTypeReference (klass);
-
- CodeAttributeDeclaration attr =
- new CodeAttributeDeclaration
("Mono.Build.Bundling.MonoBuildDictItem");
- p.CustomAttributes.Add (attr);
-
- CodeIndexerExpression index = new CodeIndexerExpression ();
- index.TargetObject = expr_this;
- index.Indices.Add (new CodePrimitiveExpression (key));
-
- // The getter:
- // { object obj = this["key"]; if (obj == null) return null;
- // else return (Type) obj; }
-
- CodeVariableDeclarationStatement getv =
- new CodeVariableDeclarationStatement (tr_object, "obj");
- getv.InitExpression = index;
- getv.LinePragma = line;
- p.GetStatements.Add (getv);
-
- CodeVariableReferenceExpression vref =
- new CodeVariableReferenceExpression ("obj");
- CodeBinaryOperatorExpression bop =
- new CodeBinaryOperatorExpression ();
- bop.Left = vref;
- bop.Operator = CodeBinaryOperatorType.IdentityEquality;
- bop.Right = expr_null;
-
- CodeConditionStatement cond = new CodeConditionStatement ();
- cond.LinePragma = line;
- cond.Condition = bop;
-
- CodeMethodReturnStatement ret = new CodeMethodReturnStatement ();
- ret.Expression = expr_null;
- ret.LinePragma = line;
- cond.TrueStatements.Add (ret);
-
- CodeCastExpression cast = new CodeCastExpression (klass, vref);
- ret = new CodeMethodReturnStatement ();
- ret.Expression = cast;
- ret.LinePragma = line;
- cond.FalseStatements.Add (ret);
- p.GetStatements.Add (cond);
-
- // The (much simpler) setter
- CodeExpression val = new CodePropertySetValueReferenceExpression ();
- CodeAssignStatement assg = new CodeAssignStatement (index, val);
- p.SetStatements.Add (assg);
-
- cur_type.Members.Add (p);
- }
-
public void AddResultField (string klass, string name, bool
want_default)
{
CodeLinePragma line = lexer.LinePragma;
Modified: trunk/mbuild/mb-bundlegen/Tokenizer.cs
===================================================================
--- trunk/mbuild/mb-bundlegen/Tokenizer.cs 2006-07-19 03:41:02 UTC (rev
62724)
+++ trunk/mbuild/mb-bundlegen/Tokenizer.cs 2006-07-19 03:51:30 UTC (rev
62725)
@@ -94,9 +94,7 @@
keywords["sourcefile"] = Token.SOURCEFILE;
keywords["tags"] = Token.TAGS;
keywords["abstract"] = Token.ABSTRACT;
- keywords["dictitem"] = Token.DICTITEM;
keywords["ordered"] = Token.ORDERED;
- keywords["field"] = Token.FIELD;
keywords["enum"] = Token.ENUM;
keywords["restype"] = Token.RESTYPE;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches