[svn] r6334: nemerle/trunk/ncc: CompilationOptions.n STATELESS-TODO
hierarchy/TypesManager.n parsing/Lexer...
malekith
svnadmin at nemerle.org
Wed May 24 22:17:04 CEST 2006
Log:
A few more statics bite the dust.
Author: malekith
Date: Wed May 24 22:17:02 2006
New Revision: 6334
Modified:
nemerle/trunk/ncc/CompilationOptions.n
nemerle/trunk/ncc/STATELESS-TODO
nemerle/trunk/ncc/hierarchy/TypesManager.n
nemerle/trunk/ncc/parsing/Lexer.n
nemerle/trunk/ncc/passes.n
Modified: nemerle/trunk/ncc/CompilationOptions.n
==============================================================================
--- nemerle/trunk/ncc/CompilationOptions.n (original)
+++ nemerle/trunk/ncc/CompilationOptions.n Wed May 24 22:17:02 2006
@@ -60,6 +60,7 @@
public mutable PersistentLibraries : bool;
public mutable MainClass : string;
public mutable DoPrintStats : bool;
+ public mutable LexerStoreComments : bool;
public mutable LinkedResources : list [string];
public mutable EmbeddedResources : list [string];
@@ -121,6 +122,7 @@
DumpDecisionTree = false;
IndentationSyntax = false;
DoPrintStats = false;
+ LexerStoreComments = false;
LinkedResources = [];
EmbeddedResources = [];
ReferencedLibraries = [];
@@ -355,7 +357,7 @@
help = "Output XML documentation of program's class hierarchy",
handler = fun (x) {
this.XmlDocOutputFileName = x;
- LexerFile.store_comments = true;
+ LexerStoreComments = true;
}),
Getopt.CliOption.String (name = "-resource",
Modified: nemerle/trunk/ncc/STATELESS-TODO
==============================================================================
--- nemerle/trunk/ncc/STATELESS-TODO (original)
+++ nemerle/trunk/ncc/STATELESS-TODO Wed May 24 22:17:02 2006
@@ -9,7 +9,4 @@
- HierarchyEmitter._debug_emit
- ILEmitter.MS_NET_RuntimeType
- Typer4...
-- TypeBuilder.messenger
-- TypesManagers.global_nr
- Location...
-- LexerFile.store_comments
Modified: nemerle/trunk/ncc/hierarchy/TypesManager.n
==============================================================================
--- nemerle/trunk/ncc/hierarchy/TypesManager.n (original)
+++ nemerle/trunk/ncc/hierarchy/TypesManager.n Wed May 24 22:17:02 2006
@@ -52,8 +52,6 @@
CurrentMethod : IMethod;
internal mutable AddedNr : int;
- internal mutable static global_nr : int;
-
/// we need the earlier expanded macros to get the highest values, as heap is returning max values first
public CompareTo (other : AttributeMacroExpansion) : int
{
@@ -134,8 +132,8 @@
internal AddMacroExpansion (exp : AttributeMacroExpansion) : void
{
// set ordering
- exp.AddedNr = AttributeMacroExpansion.global_nr;
- unchecked (AttributeMacroExpansion.global_nr = AttributeMacroExpansion.global_nr + 1);
+ exp.AddedNr = ManagerClass.Instance.AttributeMacroExpansion_global_nr;
+ unchecked (ManagerClass.Instance.AttributeMacroExpansion_global_nr++);
//Message.Debug ($"adding $exp");
attribute_macros_queue.Add (exp);
Modified: nemerle/trunk/ncc/parsing/Lexer.n
==============================================================================
--- nemerle/trunk/ncc/parsing/Lexer.n (original)
+++ nemerle/trunk/ncc/parsing/Lexer.n Wed May 24 22:17:02 2006
@@ -1388,8 +1388,6 @@
comment_store : StringBuilder;
mutable comment_loc : Location;
- public static mutable store_comments : bool;
-
private check_last_line_for_lf (file : IO.FileStream) : void
{
_ = file.Seek (-1 :> Int64, IO.SeekOrigin.End);
@@ -1407,10 +1405,6 @@
_ = file.Seek (0 :> Int64, IO.SeekOrigin.Begin);
}
- public static this () {
- store_comments = false;
- }
-
public override Dispose () : void {
(reader : IDisposable).Dispose ();
}
@@ -1449,7 +1443,7 @@
// we are for sure in one line comment
_ = read ();
try {
- if (store_comments && peek () == '/') {
+ if (Manager.Options.LexerStoreComments && peek () == '/') {
comment_loc = Location (file_idx, line, col - 2);
_ = read ();
mutable cc = ' ';
@@ -1483,7 +1477,7 @@
| _ => loop1 (false, store)
}
};
- if (store_comments && peek_or_white () == '*') {
+ if (Manager.Options.LexerStoreComments && peek_or_white () == '*') {
comment_loc = Location (file_idx, line, col - 2);
_ = read ();
loop1 (true, true);
Modified: nemerle/trunk/ncc/passes.n
==============================================================================
--- nemerle/trunk/ncc/passes.n (original)
+++ nemerle/trunk/ncc/passes.n Wed May 24 22:17:02 2006
@@ -67,7 +67,7 @@
internal mutable TyVar_reuse_queue : TyVar;
internal mutable TyVar_Id : int;
internal mutable Util_Id : int;
-
+ internal mutable AttributeMacroExpansion_global_nr : int;
// won't be needed when we use this object only once
KillStatics () : void
@@ -81,6 +81,7 @@
TyVar_Id = 0;
TyVar_reuse_queue = null;
Util_Id = 0;
+ AttributeMacroExpansion_global_nr = 0;
}
#endregion
More information about the svn
mailing list