* compilation of unit objects in the i8086 medium memory model fixed (via the use of codepointer)

git-svn-id: trunk@25158 -
This commit is contained in:
nickysn 2013-07-21 17:43:44 +00:00
parent d89b9a4311
commit 6daadff427

View File

@ -212,8 +212,8 @@ TYPE
TStreamRec = Packed RECORD TStreamRec = Packed RECORD
ObjType: Sw_Word; { Object type id } ObjType: Sw_Word; { Object type id }
VmtLink: pointer; { VMT link } VmtLink: pointer; { VMT link }
Load : Pointer; { Object load code } Load : CodePointer; { Object load code }
Store: Pointer; { Object store code } Store: CodePointer; { Object store code }
Next : PStreamRec; { Next stream record } Next : PStreamRec; { Next stream record }
END; END;
@ -407,8 +407,8 @@ TYPE
FUNCTION At (Index: Sw_Integer): Pointer; FUNCTION At (Index: Sw_Integer): Pointer;
FUNCTION IndexOf (Item: Pointer): Sw_Integer; Virtual; FUNCTION IndexOf (Item: Pointer): Sw_Integer; Virtual;
FUNCTION GetItem (Var S: TStream): Pointer; Virtual; FUNCTION GetItem (Var S: TStream): Pointer; Virtual;
FUNCTION LastThat (Test: Pointer): Pointer; FUNCTION LastThat (Test: CodePointer): Pointer;
FUNCTION FirstThat (Test: Pointer): Pointer; FUNCTION FirstThat (Test: CodePointer): Pointer;
PROCEDURE Pack; PROCEDURE Pack;
PROCEDURE FreeAll; PROCEDURE FreeAll;
PROCEDURE DeleteAll; PROCEDURE DeleteAll;
@ -418,7 +418,7 @@ TYPE
PROCEDURE AtFree (Index: Sw_Integer); PROCEDURE AtFree (Index: Sw_Integer);
PROCEDURE FreeItem (Item: Pointer); Virtual; PROCEDURE FreeItem (Item: Pointer); Virtual;
PROCEDURE AtDelete (Index: Sw_Integer); PROCEDURE AtDelete (Index: Sw_Integer);
PROCEDURE ForEach (Action: Pointer); PROCEDURE ForEach (Action: CodePointer);
PROCEDURE SetLimit (ALimit: Sw_Integer); Virtual; PROCEDURE SetLimit (ALimit: Sw_Integer); Virtual;
PROCEDURE Error (Code, Info: Integer); Virtual; PROCEDURE Error (Code, Info: Integer); Virtual;
PROCEDURE AtPut (Index: Sw_Integer; Item: Pointer); PROCEDURE AtPut (Index: Sw_Integer; Item: Pointer);
@ -580,8 +580,8 @@ TYPE
VMT Pointer to the VMT (obtained by TypeOf()). VMT Pointer to the VMT (obtained by TypeOf()).
returns Pointer to the instance. returns Pointer to the instance.
} }
function CallVoidConstructor(Ctor: pointer; Obj: pointer; VMT: pointer): pointer;inline; function CallVoidConstructor(Ctor: codepointer; Obj: pointer; VMT: pointer): pointer;inline;
function CallPointerConstructor(Ctor: pointer; Obj: pointer; VMT: pointer; Param1: pointer): pointer;inline; function CallPointerConstructor(Ctor: codepointer; Obj: pointer; VMT: pointer; Param1: pointer): pointer;inline;
{ Method calls. { Method calls.
@ -589,8 +589,8 @@ function CallPointerConstructor(Ctor: pointer; Obj: pointer; VMT: pointer; Param
Obj Pointer to the instance. NIL if new instance to be allocated. Obj Pointer to the instance. NIL if new instance to be allocated.
returns Pointer to the instance. returns Pointer to the instance.
} }
function CallVoidMethod(Method: pointer; Obj: pointer): pointer;inline; function CallVoidMethod(Method: codepointer; Obj: pointer): pointer;inline;
function CallPointerMethod(Method: pointer; Obj: pointer; Param1: pointer): pointer;inline; function CallPointerMethod(Method: codepointer; Obj: pointer; Param1: pointer): pointer;inline;
{ Local-function/procedure calls. { Local-function/procedure calls.
@ -598,8 +598,8 @@ function CallPointerMethod(Method: pointer; Obj: pointer; Param1: pointer): poin
Frame Frame pointer of the wrapping function. Frame Frame pointer of the wrapping function.
} }
function CallVoidLocal(Func: pointer; Frame: Pointer): pointer;inline; function CallVoidLocal(Func: codepointer; Frame: Pointer): pointer;inline;
function CallPointerLocal(Func: pointer; Frame: Pointer; Param1: pointer): pointer;inline; function CallPointerLocal(Func: codepointer; Frame: Pointer; Param1: pointer): pointer;inline;
{ Calls of functions/procedures local to methods. { Calls of functions/procedures local to methods.
@ -607,8 +607,8 @@ function CallPointerLocal(Func: pointer; Frame: Pointer; Param1: pointer): point
Frame Frame pointer of the wrapping method. Frame Frame pointer of the wrapping method.
Obj Pointer to the object that the method belongs to. Obj Pointer to the object that the method belongs to.
} }
function CallVoidMethodLocal(Func: pointer; Frame: Pointer; Obj: pointer): pointer;inline; function CallVoidMethodLocal(Func: codepointer; Frame: Pointer; Obj: pointer): pointer;inline;
function CallPointerMethodLocal(Func: pointer; Frame: Pointer; Obj: pointer; Param1: pointer): pointer;inline; function CallPointerMethodLocal(Func: codepointer; Frame: Pointer; Obj: pointer; Param1: pointer): pointer;inline;
{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
@ -687,7 +687,7 @@ CONST
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
{ INITIALIZED DOS/DPMI/WIN/OS2 PUBLIC VARIABLES } { INITIALIZED DOS/DPMI/WIN/OS2 PUBLIC VARIABLES }
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
StreamError: Pointer = Nil; { Stream error ptr } StreamError: CodePointer = Nil; { Stream error ptr }
DefaultTPCompatible: Boolean = false; DefaultTPCompatible: Boolean = false;
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
@ -751,13 +751,13 @@ type
PointerMethod = function(Obj: pointer; Param1: pointer): pointer; PointerMethod = function(Obj: pointer; Param1: pointer): pointer;
function CallVoidConstructor(Ctor: pointer; Obj: pointer; VMT: pointer): pointer;inline; function CallVoidConstructor(Ctor: codepointer; Obj: pointer; VMT: pointer): pointer;inline;
begin begin
CallVoidConstructor := VoidConstructor(Ctor)(Obj, VMT); CallVoidConstructor := VoidConstructor(Ctor)(Obj, VMT);
end; end;
function CallPointerConstructor(Ctor: pointer; Obj: pointer; VMT: pointer; Param1: pointer): pointer;inline; function CallPointerConstructor(Ctor: codepointer; Obj: pointer; VMT: pointer; Param1: pointer): pointer;inline;
{$undef FPC_CallPointerConstructor_Implemented} {$undef FPC_CallPointerConstructor_Implemented}
begin begin
{$define FPC_CallPointerConstructor_Implemented} {$define FPC_CallPointerConstructor_Implemented}
@ -768,13 +768,13 @@ end;
{$endif not FPC_CallPointerConstructor_Implemented} {$endif not FPC_CallPointerConstructor_Implemented}
function CallVoidMethod(Method: pointer; Obj: pointer): pointer;inline; function CallVoidMethod(Method: codepointer; Obj: pointer): pointer;inline;
begin begin
CallVoidMethod := VoidMethod(Method)(Obj) CallVoidMethod := VoidMethod(Method)(Obj)
end; end;
function CallPointerMethod(Method: pointer; Obj: pointer; Param1: pointer): pointer;inline; function CallPointerMethod(Method: codepointer; Obj: pointer; Param1: pointer): pointer;inline;
{$undef FPC_CallPointerMethod_Implemented} {$undef FPC_CallPointerMethod_Implemented}
begin begin
{$define FPC_CallPointerMethod_Implemented} {$define FPC_CallPointerMethod_Implemented}
@ -785,25 +785,25 @@ end;
{$endif not FPC_CallPointerMethod_Implemented} {$endif not FPC_CallPointerMethod_Implemented}
function CallVoidLocal(Func: pointer; Frame: Pointer): pointer;inline; function CallVoidLocal(Func: codepointer; Frame: Pointer): pointer;inline;
begin begin
CallVoidLocal := VoidLocal(Func)(Frame) CallVoidLocal := VoidLocal(Func)(Frame)
end; end;
function CallPointerLocal(Func: pointer; Frame: Pointer; Param1: pointer): pointer;inline; function CallPointerLocal(Func: codepointer; Frame: Pointer; Param1: pointer): pointer;inline;
begin begin
CallPointerLocal := PointerLocal(Func)(Frame, Param1) CallPointerLocal := PointerLocal(Func)(Frame, Param1)
end; end;
function CallVoidMethodLocal(Func: pointer; Frame: Pointer; Obj: pointer): pointer;inline; function CallVoidMethodLocal(Func: codepointer; Frame: Pointer; Obj: pointer): pointer;inline;
begin begin
CallVoidMethodLocal := VoidMethodLocal(Func)(Frame) CallVoidMethodLocal := VoidMethodLocal(Func)(Frame)
end; end;
function CallPointerMethodLocal(Func: pointer; Frame: Pointer; Obj: pointer; Param1: pointer): pointer;inline; function CallPointerMethodLocal(Func: codepointer; Frame: Pointer; Obj: pointer; Param1: pointer): pointer;inline;
begin begin
CallPointerMethodLocal := PointerMethodLocal(Func)(Frame, Param1) CallPointerMethodLocal := PointerMethodLocal(Func)(Frame, Param1)
end; end;
@ -1904,7 +1904,7 @@ END;
{$PUSH} {$PUSH}
{$W+} {$W+}
FUNCTION TCollection.LastThat (Test: Pointer): Pointer; FUNCTION TCollection.LastThat (Test: CodePointer): Pointer;
VAR I: LongInt; VAR I: LongInt;
BEGIN BEGIN
@ -1933,7 +1933,7 @@ END;
{--TCollection--------------------------------------------------------------} {--TCollection--------------------------------------------------------------}
{ FirstThat -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB } { FirstThat -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB }
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
FUNCTION TCollection.FirstThat (Test: Pointer): Pointer; FUNCTION TCollection.FirstThat (Test: CodePointer): Pointer;
VAR I: LongInt; VAR I: LongInt;
BEGIN BEGIN
For I := 1 To Count Do Begin { Up from first item } For I := 1 To Count Do Begin { Up from first item }
@ -2062,7 +2062,7 @@ END;
{$PUSH} {$PUSH}
{$W+} {$W+}
PROCEDURE TCollection.ForEach (Action: Pointer); PROCEDURE TCollection.ForEach (Action: CodePointer);
VAR I: LongInt; VAR I: LongInt;
BEGIN BEGIN
For I := 1 To Count Do { Up from first item } For I := 1 To Count Do { Up from first item }