Permalink
Browse files

Horrible little hack to redirect CompilerBlob so serialize can build …

…NieczaBackendDotnet
  • Loading branch information...
1 parent bd53b44 commit b117e929304c41b4c216d1d4686b360687821a45 @sorear committed Oct 29, 2011
Showing with 9 additions and 3 deletions.
  1. +3 −3 Newmakefile
  2. +6 −0 lib/CodeGen.cs
View
@@ -45,8 +45,8 @@ run/Niecza.exe: .fetch-stamp $(patsubst %,boot/obj/Run.%.ser,$(srcunits)) src/ni
$(RUN_CLR) boot/run/Niecza.exe -C JSYNC
touch .fetch-stamp
-boot/obj/CompilerBlob.dll: .fetch-stamp src/CompilerBlob.cs
- $(CSC) /target:library /out:boot/obj/CompilerBlob.dll /r:Run.Kernel \
+boot/obj/Run.CompilerBlob.dll: .fetch-stamp src/CompilerBlob.cs
+ $(CSC) /target:library /out:boot/obj/Run.CompilerBlob.dll /r:Run.Kernel \
/lib:boot/obj src/CompilerBlob.cs
obj/Run.Kernel.dll: $(patsubst %,lib/%,$(cskernel))
$(CSC) /target:exe /out:obj/Run.Kernel.dll /lib:obj /unsafe+ \
@@ -134,7 +134,7 @@ help:
@echo 'help this list of targets'
@echo ''
-boot/obj/NieczaBackendDotnet.ser: boot/obj/CompilerBlob.dll
+boot/obj/Run.NieczaBackendDotnet.ser: boot/obj/Run.CompilerBlob.dll
# grep -r '^use' src/*.pm6 | sed 's|src/\(.*\)\.pm6:use \(.*\);|boot/obj/Run.\1.ser: boot/obj/Run.\2.ser|' | grep -v MONKEY_TYPING
boot/obj/Run.NAMOutput.ser: boot/obj/Run.JSYNC.ser
View
@@ -3019,6 +3019,12 @@ class NamProcessor {
return CpsOp.MethodCall(mi, rst); };
handlers["rawscall"] = delegate(NamProcessor th, object[] z) {
string name = JScalar.S(z[1]);
+ // Horrible, horrible hack. We need to redirect references
+ // to CompilerBlob while compiling the compiler because
+ // otherwise they will be resolved to the compiler compiler's
+ // copy.
+ if (Backend.prefix == "Run.")
+ name = name.Replace("CompilerBlob", "Run.CompilerBlob");
int ixn = name.LastIndexOf(':');
Type cpsrt = null;
if (ixn >= 0) {

0 comments on commit b117e92

Please sign in to comment.