Syndicate the Cosmos Blog Feed.

Scanner Maps

The new scanner is coming along well. Still a bit to go, but already its design has pointed out several bugs in our older code.

We have also built in a lot more logging. One example is the scanner map. At various stages the scanner might be scanning too much, or too little. At other times it scans new code that requires new plugs. Tracing the code is one way to find out these issues, but its very tedious.

Because of this I have implemented an optional log feature which outputs a scanner map. Below is a small excerpt, and note that the map is not emitted in order.

Int32 Compare(System.String, Int32, System.String, Int32, Int32, System.StringComparison)
  Boolean op_Equality(System.String, System.String)
    Call
  Int32 Compare(System.String, Int32, Int32, System.String, Int32, Int32, System.Globalization.CompareOptions)
    Call

Int32 Compare(System.String, System.String, System.StringComparison)
  Int32 Compare(System.String, System.String, System.Globalization.CompareOptions)
    Call
  Int32 CompareOrdinalHelper(System.String, System.String)
    Call
  Boolean IsAscii()
    Call
  Int32 nativeCompareOrdinal(System.String, System.String, Boolean)
    Call
  Int32 CompareOrdinalIgnoreCase(System.String, System.String)
    Call
  Void .ctor(System.String)
    Call

Void .ctor(System.String)
  System.NotSupportedException
    Declaring Type

Void .cctor()
  Double Int64BitsToDouble(Int64)
    Call

Double Int64BitsToDouble(Int64)
  System.BitConverter
    Declaring Type
  System.Int64
    Parameter

System.BitConverter
  Void .cctor()
    Static Constructor

Currently it is scanning code for Int64, which causes issues because currently we do not have 64 bit support. However somehow the old scanner functioned, so this means we are scanning too much, plugs are not being properly resolved, or some other issue. Using this scanner map we can trace it though. We can see that the scanner found Int64 as a parameter to the Double.Int64BitsToDouble(Int64) method. Which also should not be scanned. So we can then search again and see where Double was picked up, and so on. Until we find a method or type that was accidentally scanned, or a plug that was missed.

Now HTML with Hyper Links

I've now updated it to emit HTML with hyperlinks. To find where any source was linked in, you can merely click on the item and it will take you to the entry where it was linked. This makes following up links very fast!



Comments:

-- No Comments --

Post a comment