Browse Source

Finally got the reflection back.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6443 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 years ago
parent
commit
2d84ea448c
2 changed files with 34 additions and 16 deletions
  1. 8 16
      source/FoxIntermediateBackend.Mod
  2. 26 0
      source/Win32.Machine.Mod

+ 8 - 16
source/FoxIntermediateBackend.Mod

@@ -11201,26 +11201,18 @@ TYPE
 				END BaseType;
 
 				PROCEDURE RecordType(type: SyntaxTree.RecordType);
-				VAR destination: Sections.Section; name: SyntaxTree.IdentifierString;
+				VAR destination: Sections.Section; name: SyntaxTree.IdentifierString; sname: Basic.SegmentedName;
 				BEGIN
 					destination := module.allSections.FindBySymbol(type.typeDeclaration); (*TODO*)
-					IF destination = NIL THEN destination := importedSymbols.BySymbol(type.typeDeclaration) END;
-
+					IF type.pointerType # NIL THEN
+						Char(section,rfRecordPointer)
+					ELSE
+						Char(section,rfRecord);
+					END;
 					IF destination = NIL THEN
-						(* imported unused record type *)
-						Char(section,0X); (* nil type *)
-						type.typeDeclaration.GetName(name);
-						(*
-						this happens when a symbol from a different module is used but the type desciptor is not necessary to be present in the current module
-						D.Str("Warning: Unreferenced record type encountered: "); D.String(name); D.String(" unused? "); D.Ln;
-						*)
+						Longint(section,0);
 					ELSE
-						IF type.pointerType # NIL THEN
-							Char(section,rfRecordPointer)
-						ELSE
-							Char(section,rfRecord);
-						END;
-						Longint(section,(destination.offset ));
+						Longint(section,destination.offset); (* used for ? *)
 					END;
 				END RecordType;
 				

+ 26 - 0
source/Win32.Machine.Mod

@@ -298,6 +298,32 @@ BEGIN
 	RETURN 0
 END ID;
 
+
+(**
+ * Flush Data Cache for the specified virtual address range. If len is negative, flushes the whole cache.
+ * This is used on some architecture to interact with DMA hardware (e.g. Ethernet and USB. It can be
+ * left empty on Intel architecture.
+ *)
+PROCEDURE FlushDCacheRange * (adr: ADDRESS; len: LONGINT);
+END FlushDCacheRange;
+
+(**
+ * Invalidate Data Cache for the specified virtual address range. If len is negative, flushes the whole cache.
+ * This is used on some architecture to interact with DMA hardware (e.g. Ethernet and USB. It can be
+ * left empty on Intel architecture.
+ *)
+PROCEDURE InvalidateDCacheRange * (adr: ADDRESS; len: LONGINT);
+END InvalidateDCacheRange;
+
+(**
+ * Invalidate Instruction Cache for the specified virtual address range. If len is negative, flushes the whole cache.
+ * This is used on some architecture to interact with DMA hardware (e.g. Ethernet and USB. It can be
+ * left empty on Intel architecture.
+ *)
+PROCEDURE InvalidateICacheRange * (adr: ADDRESS; len: LONGINT);
+END InvalidateICacheRange;
+
+
 (* setup MMX, SSE and SSE2..SSE5 and AVX extension *)
 
 PROCEDURE SetupSSE2Ext;