git-svn-id: https://svn.code.sf.net/p/kolmck/code@23 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07
This commit is contained in:
@ -43,7 +43,7 @@ interface
|
|||||||
Example: {$IF RTLVersion >= 16.2} ... {$IFEND} *)
|
Example: {$IF RTLVersion >= 16.2} ... {$IFEND} *)
|
||||||
|
|
||||||
const
|
const
|
||||||
RTLVersion = 14.1;
|
RTLVersion = 18.00;
|
||||||
|
|
||||||
{$EXTERNALSYM CompilerVersion}
|
{$EXTERNALSYM CompilerVersion}
|
||||||
|
|
||||||
@ -2887,9 +2887,9 @@ begin
|
|||||||
MemoryManager := MemMgr;
|
MemoryManager := MemMgr;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//{X} - function is replaced with pointer to one.
|
{X+}// - function is replaced with pointer to one.
|
||||||
// function IsMemoryManagerSet: Boolean;
|
{X-}// function IsMemoryManagerSet: Boolean;
|
||||||
function IsDelphiMemoryManagerSet: Boolean;
|
{X+}function IsDelphiMemoryManagerSet: Boolean;
|
||||||
begin
|
begin
|
||||||
with MemoryManager do
|
with MemoryManager do
|
||||||
Result := (@GetMem <> @SysGetMem) or (@FreeMem <> @SysFreeMem) or
|
Result := (@GetMem <> @SysGetMem) or (@FreeMem <> @SysFreeMem) or
|
||||||
@ -3033,6 +3033,8 @@ asm
|
|||||||
POP EAX
|
POP EAX
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// Access to a TLS variable. Note the comment in BeginThread before
|
||||||
|
// you change the implementation of this function.
|
||||||
function AreOSExceptionsBlocked: Boolean;
|
function AreOSExceptionsBlocked: Boolean;
|
||||||
asm
|
asm
|
||||||
CALL SysInit.@GetTLS
|
CALL SysInit.@GetTLS
|
||||||
@ -3227,7 +3229,7 @@ procedure ErrorAt(ErrorCode: Byte; ErrorAddr: Pointer);
|
|||||||
|
|
||||||
const
|
const
|
||||||
reMap: array [TRunTimeError] of Byte = (
|
reMap: array [TRunTimeError] of Byte = (
|
||||||
0,
|
0, { reNone }
|
||||||
203, { reOutOfMemory }
|
203, { reOutOfMemory }
|
||||||
204, { reInvalidPtr }
|
204, { reInvalidPtr }
|
||||||
200, { reDivByZero }
|
200, { reDivByZero }
|
||||||
@ -3675,7 +3677,7 @@ asm
|
|||||||
|
|
||||||
@@fin:
|
@@fin:
|
||||||
*) {X-}
|
*) {X-}
|
||||||
//---------------------------------------
|
{X+} //---------------------------------------
|
||||||
{X+} // And now, let us write speedy:
|
{X+} // And now, let us write speedy:
|
||||||
CMP ECX, 4
|
CMP ECX, 4
|
||||||
JGE @@long
|
JGE @@long
|
||||||
@ -9732,7 +9734,7 @@ end;
|
|||||||
as a signaling mechanism to an interested debugger. If the debugger sets
|
as a signaling mechanism to an interested debugger. If the debugger sets
|
||||||
the DebugHook flag to 1 or 2, then all exception processing is tracked by
|
the DebugHook flag to 1 or 2, then all exception processing is tracked by
|
||||||
raising these special exceptions. The debugger *MUST* respond to the
|
raising these special exceptions. The debugger *MUST* respond to the
|
||||||
debug event with DBG_CONTINE so that normal processing will occur.
|
debug event with DBG_CONTINUE so that normal processing will occur.
|
||||||
}
|
}
|
||||||
|
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
@ -11124,10 +11126,10 @@ end;
|
|||||||
procedure SetExceptionHandler;
|
procedure SetExceptionHandler;
|
||||||
asm
|
asm
|
||||||
XOR EDX,EDX { using [EDX] saves some space over [0] }
|
XOR EDX,EDX { using [EDX] saves some space over [0] }
|
||||||
{X} // now we come here from another place, and EBP is used above for loop counter
|
{X+} // now we come here from another place, and EBP is used above for loop counter
|
||||||
{X} // let us restore it...
|
{X+} // let us restore it...
|
||||||
{X} PUSH EBP
|
{X+} PUSH EBP
|
||||||
{X} LEA EBP, [ESP + $50]
|
{X+} LEA EBP, [ESP + $50]
|
||||||
LEA EAX,[EBP-12]
|
LEA EAX,[EBP-12]
|
||||||
MOV ECX,FS:[EDX] { ECX := head of chain }
|
MOV ECX,FS:[EDX] { ECX := head of chain }
|
||||||
MOV FS:[EDX],EAX { head of chain := @exRegRec }
|
MOV FS:[EDX],EAX { head of chain := @exRegRec }
|
||||||
@ -11145,8 +11147,7 @@ asm
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
MOV InitContext.ExcFrame,EAX
|
MOV InitContext.ExcFrame,EAX
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{X+} POP EBP
|
||||||
{X} POP EBP
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -11467,7 +11468,7 @@ asm
|
|||||||
LEA ECX,[EBP- (type TExcFrame) - (type TInitContext)]
|
LEA ECX,[EBP- (type TExcFrame) - (type TInitContext)]
|
||||||
MOV InitContext.OuterContext,ECX
|
MOV InitContext.OuterContext,ECX
|
||||||
XOR ECX,ECX
|
XOR ECX,ECX
|
||||||
CMP dword ptr [EBP+12],0
|
CMP DWORD PTR [EBP+12],0
|
||||||
JNE @@notShutDown
|
JNE @@notShutDown
|
||||||
MOV ECX,[EAX].PackageInfoTable.UnitCount
|
MOV ECX,[EAX].PackageInfoTable.UnitCount
|
||||||
@@notShutDown:
|
@@notShutDown:
|
||||||
@ -11770,7 +11771,7 @@ asm
|
|||||||
{$IFDEF PIC}
|
{$IFDEF PIC}
|
||||||
LEA EDI, [EBX].InitContext
|
LEA EDI, [EBX].InitContext
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
MOV EDI, offset InitContext
|
MOV EDI, offset InitContext
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
MOV EBX,[EDI].TInitContext.DLLSaveEBX
|
MOV EBX,[EDI].TInitContext.DLLSaveEBX
|
||||||
@ -12183,9 +12184,9 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
skew = sizeof(StrRec);
|
skew = SizeOf(StrRec);
|
||||||
rOff = sizeof(StrRec); { refCnt offset }
|
rOff = SizeOf(StrRec); { refCnt offset }
|
||||||
overHead = sizeof(StrRec) + 1;
|
overHead = SizeOf(StrRec) + 1;
|
||||||
|
|
||||||
procedure _LStrClr(var S);
|
procedure _LStrClr(var S);
|
||||||
{$IFDEF PUREPASCAL}
|
{$IFDEF PUREPASCAL}
|
||||||
@ -12943,7 +12944,7 @@ asm
|
|||||||
POP EDX
|
POP EDX
|
||||||
POP EAX
|
POP EAX
|
||||||
TEST EDI,EDI
|
TEST EDI,EDI
|
||||||
JNZ @@exit
|
JNZ @@exit
|
||||||
|
|
||||||
TEST EDX,EDX
|
TEST EDX,EDX
|
||||||
JE @@skip
|
JE @@skip
|
||||||
@ -13538,7 +13539,7 @@ asm
|
|||||||
CALL _LStrClr
|
CALL _LStrClr
|
||||||
|
|
||||||
TEST ESI,ESI
|
TEST ESI,ESI
|
||||||
JLE @@exit
|
JLE @@exit
|
||||||
|
|
||||||
MOV EAX,ESI
|
MOV EAX,ESI
|
||||||
CALL _NewAnsiString
|
CALL _NewAnsiString
|
||||||
@ -18965,7 +18966,7 @@ end;
|
|||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
function LoadResString(ResStringRec: PResStringRec): string;
|
function LoadResString(ResStringRec: PResStringRec): string;
|
||||||
var
|
var
|
||||||
Buffer: array [0..1023] of char;
|
Buffer: array [0..4095] of char;
|
||||||
begin
|
begin
|
||||||
if ResStringRec = nil then Exit;
|
if ResStringRec = nil then Exit;
|
||||||
if ResStringRec.Identifier < 64*1024 then
|
if ResStringRec.Identifier < 64*1024 then
|
||||||
|
Reference in New Issue
Block a user