ArrayList sources = new ArrayList ();
Hashtable method_source_hash = new Hashtable ();
Hashtable type_hash = new Hashtable ();
-#if !DISABLE_TERRANIA_CHANGES
Hashtable anonymous_scopes;
-#endif
OffsetTable ot;
int last_type_index;
int last_source_index;
int last_namespace_index;
-#if DISABLE_TERRANIA_CHANGES
- public readonly int Version = OffsetTable.CompatibilityVersion;
- public readonly bool CompatibilityMode = true;
-#else
public readonly int Version = OffsetTable.Version;
public readonly bool CompatibilityMode = false;
-#endif
public int NumLineNumbers;
methods.Add (entry);
}
-#if !DISABLE_TERRANIA_CHANGES
internal void DefineAnonymousScope (int id)
{
if (anonymous_scopes == null)
AnonymousScopeEntry scope = (AnonymousScopeEntry) anonymous_scopes [scope_id];
scope.AddCapturedScope (id, captured_name);
}
-#endif
internal int GetNextTypeIndex ()
{
}
ot.SourceTableSize = (int) bw.BaseStream.Position - ot.SourceTableOffset;
-#if !DISABLE_TERRANIA_CHANGES
if (!CompatibilityMode) {
//
// Write anonymous scope table.
}
ot.AnonymousScopeTableSize = (int) bw.BaseStream.Position - ot.AnonymousScopeTableOffset;
}
-#endif
//
// Fixup offset table.
get { return ot.TypeCount; }
}
-#if !DISABLE_TERRANIA_CHANGES
public int AnonymousScopeCount {
get { return ot.AnonymousScopeCount; }
}
-#endif
public int NamespaceCount {
get { return last_namespace_index; }
return (int) value;
}
-#if !DISABLE_TERRANIA_CHANGES
public AnonymousScopeEntry GetAnonymousScope (int id)
{
if (anonymous_scopes != null)
return (AnonymousScopeEntry) anonymous_scopes [id];
}
-#endif
internal MyBinaryReader BinaryReader {
get {
current_method.AddLocal (index, name);
}
-#if !DISABLE_TERRANIA_CHANGES
public void DefineCapturedLocal (int scope_id, string name, string captured_name)
{
file.DefineCapturedVariable (scope_id, name, captured_name,
current_method.AddScopeVariable (scope, index);
}
-#endif
public void MarkSequencePoint (int offset, int line, int column)
{
methods.Add (current_method);
}
-#if !DISABLE_TERRANIA_CHANGES
public void SetRealMethodName (string name)
{
current_method.RealMethodName = name;
}
-#endif
public void CloseMethod ()
{
public int OpenScope (int start_offset)
{
-#if !DISABLE_TERRANIA_CHANGES
if (current_method == null)
return 0;
current_method.StartBlock (CodeBlockEntry.Type.Lexical, start_offset);
-#endif
return 0;
}
public void CloseScope (int end_offset)
{
-#if !DISABLE_TERRANIA_CHANGES
if (current_method == null)
return;
current_method.EndBlock (end_offset);
-#endif
}
-#if !DISABLE_TERRANIA_CHANGES
public void OpenCompilerGeneratedBlock (int start_offset)
{
if (current_method == null)
{
file.DefineAnonymousScope (id);
}
-#endif
public void WriteSymbolFile (Guid guid)
{
foreach (SourceMethod method in methods) {
-#if !DISABLE_TERRANIA_CHANGES
method.SourceFile.Entry.DefineMethod (
method.Method.Token, method.ScopeVariables, method.Locals,
method.Lines, method.Blocks, method.RealMethodName,
method.Start.Row, method.End.Row,
method.Method.NamespaceID);
-#else
- method.SourceFile.Entry.DefineMethod (
- method.Method.Token, null, method.Locals,
- method.Lines, null, null, method.Start.Row, method.End.Row,
- method.Method.NamespaceID);
-#endif
}
try {
{
LineNumberEntry [] lines;
private ArrayList _locals;
-#if !DISABLE_TERRANIA_CHANGES
private ArrayList _blocks;
private ArrayList _scope_vars;
private Stack _block_stack;
private string _real_name;
-#endif
private ISourceMethod _method;
private ISourceFile _file;
private LineNumberEntry _start, _end;
this._end = new LineNumberEntry (endLine, 0);
}
-#if !DISABLE_TERRANIA_CHANGES
public void StartBlock (CodeBlockEntry.Type type, int start_offset)
{
if (_block_stack == null)
return null;
}
}
-#endif
public LineNumberEntry[] Lines {
get {
{
if (_locals == null)
_locals = new ArrayList ();
-#if !DISABLE_TERRANIA_CHANGES
int block_idx = CurrentBlock != null ? CurrentBlock.Index : 0;
-#else
- int block_idx = 0;
-#endif
_locals.Add (new LocalVariableEntry (index, name, block_idx));
}
-#if !DISABLE_TERRANIA_CHANGES
public ScopeVariable[] ScopeVariables {
get {
if (_scope_vars == null)
get { return _real_name; }
set { _real_name = value; }
}
-#endif
public ISourceFile SourceFile {
get { return _file; }