Ejemplo n.º 1
0
        internal CodeGenContext(CodeGenContext context) {
            this.Assembly = context.Assembly;
            this.Method = context.Method;
            this.CLRLocals = context.CLRLocals;
            this.labels = context.labels;
            this.CurrentRubyClass = context.CurrentRubyClass;

            this.orig_func = context.orig_func;                 // BBTAG
            this.orig_func_formals = context.orig_func_formals; // BBTAG
            this.currentSkeleton = context.currentSkeleton;     // BBTAG
            this.postPassList = context.postPassList;           // BBTAG
            this.peFiles = context.peFiles;                     // BBTAG
        }
Ejemplo n.º 2
0
        internal static PERWAPI.Class FindPERWAPIClass(ClassSkeleton skel, AST.Node node, List<PERWAPI.ReferenceScope> peFiles)
        {
            if (skel != null)
            {
                ClassSkeleton foundClass = skel.FindClass(node);
                if (foundClass != null && foundClass.perwapiClass != null)
                    return foundClass.perwapiClass;
            }

            PERWAPI.ClassRef perwapiClass = GetClassFromPEFile(node, peFiles, "");

            if (perwapiClass != null)
                return perwapiClass;

            List<PERWAPI.ReferenceScope> dlls = new List<PERWAPI.ReferenceScope>();

            if (Ruby.Compiler.Compiler.peRubyRuntime == null)
                Ruby.Compiler.Compiler.peRubyRuntime = PERWAPI.PEFile.ReadExportedInterface(Ruby.Compiler.Compiler.FindFile(Ruby.Compiler.Compiler.RUBY_RUNTIME, Ruby.Compiler.Compiler.GetPath()).FullName);

            if (Ruby.Compiler.Compiler.peRubyRuntime != null)
            {
                dlls.Add(Ruby.Compiler.Compiler.peRubyRuntime);
                ClassRef classRef = GetClassFromPEFile(node, dlls, "Ruby");
                if (classRef != null)
                    return classRef;
            }

            return null;
        }
Ejemplo n.º 3
0
 internal ClassSkeletonPostPass(ClassSkeleton subClass, PERWAPI.ClassDef subClassDef, AST.Node superClassNode)
 {
     this.subClass = subClass;
     this.subClassDef = subClassDef;
     this.superClassNode = superClassNode;
 }
Ejemplo n.º 4
0
 internal CodeGenContext() {
     currentSkeleton = objectSkeleton;
 }