Selaa lähdekoodia

Removed obsolete darwin calling convention flag

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8330 8c9fc860-2736-0410-a75d-ab315db34111
negelef 6 vuotta sitten
vanhempi
commit
e31dced224

+ 7 - 10
source/Compiler.Mod

@@ -17,13 +17,12 @@ CONST
 	FindPC* = 5;
 	Warnings*=7;
 	ForceModuleBodies*=8;
-	UseDarwinCCalls*=9;	(* use Darwin stack alignment for ext. C procedures *)	(*fld*)
-	SingleModule*=10;
-	Oberon07*=11;
-	ChangeCase*=12;
-	Cooperative*=13;
-	CellsAreObjects*=14;
-	UseLineNumbers*=15;
+	SingleModule*=9;
+	Oberon07*=10;
+	ChangeCase*=11;
+	Cooperative*=12;
+	CellsAreObjects*=13;
+	UseLineNumbers*=14;
 
 	DefaultBackend = "AMD";
 	DefaultFrontend = "Oberon";
@@ -177,7 +176,7 @@ TYPE
 				ELSE
 					backendName := "";
 				END;
-				checker := SemanticChecker.NewChecker(diagnostics,Info IN flags,UseDarwinCCalls IN flags,Cooperative IN flags,system,options.symbolFile,importCache,backendName);
+				checker := SemanticChecker.NewChecker(diagnostics,Info IN flags,Cooperative IN flags,system,options.symbolFile,importCache,backendName);
 				checker.replacements := options.replacements;
 				checker.Module(module);
 				IF checker.error THEN
@@ -300,7 +299,6 @@ TYPE
 		options.Add(0X, "symbolFile", Options.String);
 		options.Add(0X, "objectFile", Options.String);
 		options.Add("w","warnings", Options.Flag);
-		options.Add(0X,"darwinHost", Options.Flag);
 		options.Add(0X,"hardware", Options.String);
 		options.Add(0X,"documentation", Options.String);
 		options.Add("S","srcPath", Options.String);
@@ -416,7 +414,6 @@ TYPE
 			IF options.GetFlag("info") THEN INCL(compilerOptions.flags,Info) END;
 			IF options.GetString("findPC",compilerOptions.findPC) THEN INCL(compilerOptions.flags,FindPC) END;
 			IF options.GetFlag("warnings") THEN INCL(compilerOptions.flags, Warnings) END;
-			IF options.GetFlag("darwinHost") THEN INCL(compilerOptions.flags,UseDarwinCCalls) END;	(*fld*)
 			IF options.GetFlag("singleModule") THEN INCL(compilerOptions.flags,SingleModule) END;
 			IF options.GetFlag("oberon07") THEN INCL(compilerOptions.flags, Oberon07) END;
 			IF options.GetFlag("cooperative") THEN INCL(compilerOptions.flags, Cooperative) END;

+ 2 - 2
source/FoxAMDBackend.Mod

@@ -3335,7 +3335,7 @@ TYPE
 			ELSE
 				CASE callingConvention OF
 					|SyntaxTree.WinAPICallingConvention:  RETURN 4;
-					|SyntaxTree.CCallingConvention, SyntaxTree.DarwinCCallingConvention: RETURN 6; 
+					|SyntaxTree.CCallingConvention: RETURN 6; 
 				ELSE
 					RETURN 0;
 				END;
@@ -3378,7 +3378,7 @@ TYPE
 			IF type.form IN IntermediateCode.Integer THEN
 				CASE callingConvention OF
 					|SyntaxTree.WinAPICallingConvention:  index := winAPIRegisters[index];
-					|SyntaxTree.CCallingConvention, SyntaxTree.DarwinCCallingConvention: index := cRegisters[index]
+					|SyntaxTree.CCallingConvention: index := cRegisters[index]
 				END;
 				RETURN HardwareIntegerRegister(RAX + index, type.sizeInBits)
 			ELSIF type.form = IntermediateCode.Float THEN

+ 2 - 2
source/FoxIntermediateBackend.Mod

@@ -112,8 +112,8 @@ CONST
 		
 		WarningDynamicLoading = FALSE;
 		
-		SysvABI = {SyntaxTree.CCallingConvention, SyntaxTree.DarwinCCallingConvention}; 
-		SysvABIorWINAPI = {SyntaxTree.CCallingConvention, SyntaxTree.DarwinCCallingConvention, SyntaxTree.WinAPICallingConvention}; 
+		SysvABI = {SyntaxTree.CCallingConvention}; 
+		SysvABIorWINAPI = {SyntaxTree.CCallingConvention, SyntaxTree.WinAPICallingConvention}; 
 		
 	
 TYPE

+ 7 - 16
source/FoxSemanticChecker.Mod

@@ -76,7 +76,6 @@ TYPE
 	VAR
 		module: SyntaxTree.Module;
 		diagnostics: Diagnostics.Diagnostics;
-		useDarwinCCalls: BOOLEAN;
 		cooperative: BOOLEAN;
 		error-: BOOLEAN;
 		VerboseErrorMessage: BOOLEAN;
@@ -112,10 +111,9 @@ TYPE
 		cellsAreObjects: BOOLEAN;
 		variableAccessed: BOOLEAN;
 
-		PROCEDURE &InitChecker*(diagnostics: Diagnostics.Diagnostics; verboseErrorMessage,useDarwinCCalls,cooperative: BOOLEAN; system: Global.System; symbolFileFormat: Formats.SymbolFileFormat; VAR importCache: SyntaxTree.ModuleScope; CONST backend: ARRAY OF CHAR);
+		PROCEDURE &InitChecker*(diagnostics: Diagnostics.Diagnostics; verboseErrorMessage,cooperative: BOOLEAN; system: Global.System; symbolFileFormat: Formats.SymbolFileFormat; VAR importCache: SyntaxTree.ModuleScope; CONST backend: ARRAY OF CHAR);
 		BEGIN
 			SELF.diagnostics := diagnostics;
-			SELF.useDarwinCCalls := useDarwinCCalls;
 			SELF.cooperative := cooperative;
 			SELF.system := system;
 			SELF.symbolFileFormat := symbolFileFormat;
@@ -938,11 +936,7 @@ TYPE
 					procedureType.SetInterrupt(TRUE);
 					procedureType.SetCallingConvention(SyntaxTree.InterruptCallingConvention)
 				ELSIF HasFlag(modifiers,Global.NameC,position) THEN
-					IF useDarwinCCalls THEN	(*fld*)
-						procedureType.SetCallingConvention(SyntaxTree.DarwinCCallingConvention)
-					ELSE
-						procedureType.SetCallingConvention(SyntaxTree.CCallingConvention)
-					END
+					procedureType.SetCallingConvention(SyntaxTree.CCallingConvention)
 				ELSIF HasFlag(modifiers,Global.NamePlatformCC, position) THEN
 					IF system.platformCallingConvention = SyntaxTree.UndefinedCallingConvention THEN
 						Error(position, "undefined platform calling convention");
@@ -6947,13 +6941,10 @@ TYPE
 				IF Trace THEN D.Str("undefined"); D.Ln; END;
 				procedureType := procedure.type(SyntaxTree.ProcedureType);
 				modifiers := procedureType.modifiers;
-				IF HasFlag(modifiers, Global.NameWinAPI,position) THEN procedureType.SetCallingConvention(SyntaxTree.WinAPICallingConvention)
+				IF HasFlag(modifiers, Global.NameWinAPI,position) THEN
+					procedureType.SetCallingConvention(SyntaxTree.WinAPICallingConvention)
 				ELSIF HasFlag(modifiers, Global.NameC,position) THEN
-					IF useDarwinCCalls THEN	(*fld*)
-						procedureType.SetCallingConvention(SyntaxTree.DarwinCCallingConvention)
-					ELSE
-						procedureType.SetCallingConvention(SyntaxTree.CCallingConvention)
-					END
+					procedureType.SetCallingConvention(SyntaxTree.CCallingConvention)
 				END;
 				IF HasFlag(modifiers, Global.NameInterrupt, position) THEN
 					procedureType.SetInterrupt(TRUE);
@@ -10084,10 +10075,10 @@ TYPE
 	END EnterCase;
 
 	(** generate and return a new checker object, errors are entered into diagnostics **)
-	PROCEDURE NewChecker*(diagnostics: Diagnostics.Diagnostics; verboseErrorMessage,useDarwinCCalls,cooperative: BOOLEAN; system: Global.System; symbolFileFormat: Formats.SymbolFileFormat; VAR importCache: SyntaxTree.ModuleScope; CONST backend: ARRAY OF CHAR): Checker;
+	PROCEDURE NewChecker*(diagnostics: Diagnostics.Diagnostics; verboseErrorMessage,cooperative: BOOLEAN; system: Global.System; symbolFileFormat: Formats.SymbolFileFormat; VAR importCache: SyntaxTree.ModuleScope; CONST backend: ARRAY OF CHAR): Checker;
 	VAR checker: Checker;
 	BEGIN
-		NEW(checker, diagnostics,verboseErrorMessage,useDarwinCCalls,cooperative,system,symbolFileFormat,importCache,backend);
+		NEW(checker, diagnostics,verboseErrorMessage,cooperative,system,symbolFileFormat,importCache,backend);
 		RETURN checker
 	END NewChecker;
 

+ 6 - 7
source/FoxSyntaxTree.Mod

@@ -17,13 +17,12 @@ CONST
 		flag numbers have no meaning and are not used for object files etc., i.e. flag renumbering is possible without effect
 	*)
 	(** calling conventions *)
-	OberonCallingConvention* =0;
-	CCallingConvention* =1;
-	WinAPICallingConvention* =2;
-	DarwinCCallingConvention* =3;
-	InterruptCallingConvention* = 4;
-	PlatformCallingConvention*= 5;
-	UndefinedCallingConvention*=6;
+	OberonCallingConvention* = 0;
+	CCallingConvention* = 1;
+	WinAPICallingConvention* = 2;
+	InterruptCallingConvention* = 3;
+	PlatformCallingConvention* = 4;
+	UndefinedCallingConvention* = 5;
 
 	(** Access Flags *)
 	InternalRead* = 0;			(** can read symbol in same module *)

+ 1 - 1
source/FoxTextualSymbolFile.Mod

@@ -27,7 +27,7 @@ TYPE
 
 			IF (module # NIL) & ~(SyntaxTree.Resolved IN module.state) THEN
 				(*! should rather be done by importer *)
-				checker := SemanticChecker.NewChecker(NIL,FALSE,FALSE,TRUE,system,SELF,importCache,"");
+				checker := SemanticChecker.NewChecker(NIL,FALSE,TRUE,system,SELF,importCache,"");
 				checker.Module(module); (* semantic check *)
 				IF checker.error THEN module := NIL END;
 			END;