Browse Source

Removed reflection for simple metadata (such as in Minos)

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6488 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 years ago
parent
commit
34135000f2
1 changed files with 6 additions and 5 deletions
  1. 6 5
      source/FoxIntermediateBackend.Mod

+ 6 - 5
source/FoxIntermediateBackend.Mod

@@ -10658,9 +10658,10 @@ TYPE
 		BEGIN
 			SELF.module := module;
 			Global.GetModuleName(module.module,moduleName);
-			NEW(moduleNamePool, 32);
-			moduleNamePoolSection := Block("Heaps","SystemBlockDesc",".@ModuleNamePool", namePoolOffset);
-			
+			IF ReflectionSupport &  ~simple THEN 
+				NEW(moduleNamePool, 32);
+				moduleNamePoolSection := Block("Heaps","SystemBlockDesc",".@ModuleNamePool", namePoolOffset);
+			END;
 		END SetModule;
 
 		PROCEDURE GetTypeRecordBaseOffset(numberMethods: LONGINT): LONGINT;
@@ -12063,7 +12064,7 @@ TYPE
 			PROCEDURE ReflectVariables(in: IntermediateCode.Section; symbol: SyntaxTree.Symbol);
 			VAR type: SyntaxTree.Type; variable: SyntaxTree.Variable; pc: LONGINT; section: IntermediateCode.Section;
 			BEGIN
-				IF ~ReflectionSupport THEN variable := NIL
+				IF ~ReflectionSupport OR simple THEN variable := NIL
 				ELSIF symbol IS SyntaxTree.TypeDeclaration THEN
 					type := symbol(SyntaxTree.TypeDeclaration).declaredType.resolved;
 					IF type IS SyntaxTree.PointerType THEN
@@ -12090,7 +12091,7 @@ TYPE
 			PROCEDURE ReflectProcedures(in: IntermediateCode.Section; symbol: SyntaxTree.Symbol);
 			VAR type: SyntaxTree.Type; procedure: SyntaxTree.Procedure; pc: LONGINT; section: IntermediateCode.Section;
 			BEGIN
-				IF ~ReflectionSupport THEN procedure := NIL
+				IF ~ReflectionSupport OR simple THEN procedure := NIL
 				ELSIF symbol IS SyntaxTree.TypeDeclaration THEN
 					type := symbol(SyntaxTree.TypeDeclaration).declaredType.resolved;
 					IF type IS SyntaxTree.PointerType THEN