Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add stash log processor
  • Loading branch information
sorear committed Dec 23, 2010
1 parent 95e6723 commit edc4573
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/CLRBackend.cs
Expand Up @@ -815,6 +815,10 @@ sealed class Tokens {
typeof(Kernel).GetMethod("SetStatus");
public static readonly MethodInfo Kernel_SortHelper =
typeof(Kernel).GetMethod("SortHelper");
public static readonly MethodInfo Kernel_GetVar =
typeof(Kernel).GetMethod("GetVar");
public static readonly MethodInfo Kernel_CreatePath =
typeof(Kernel).GetMethod("CreatePath");
public static readonly MethodInfo DMO_FillParametricRole =
typeof(DynMetaObject).GetMethod("FillParametricRole");
public static readonly MethodInfo DMO_FillRole =
Expand Down Expand Up @@ -2986,6 +2990,19 @@ public class CLRBackend {

List<CpsOp> thaw = new List<CpsOp>(constantInit);

foreach (object le in unit.log) {
object[] lea = (object[]) le;
string t = ((JScalar)lea[0]).str;
if (t == "pkg" || t == "var") {
CpsOp[] sa = new CpsOp[] { CpsOp.StringArray(false, JScalar.SA(0, lea[1])) };
if (t == "pkg") {
thaw.Add(CpsOp.MethodCall(null, Tokens.Kernel_CreatePath, sa));
} else {
thaw.Add(CpsOp.Sink(CpsOp.MethodCall(null, Tokens.Kernel_GetVar, sa)));
}
}
}

unit.VisitPackages(delegate(int ix, Package pkg) {
if (!(pkg is ModuleWithTypeObject))
return;
Expand Down

0 comments on commit edc4573

Please sign in to comment.