mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:09:20 +02:00
fcl-passrc: resolver: GetElementSourcePos for intrinsic
git-svn-id: trunk@38841 -
This commit is contained in:
parent
f8ebe44fd0
commit
2750a0010c
@ -13376,6 +13376,11 @@ var
|
|||||||
begin
|
begin
|
||||||
if El=nil then exit('nil');
|
if El=nil then exit('nil');
|
||||||
UnmangleSourceLineNumber(El.SourceLinenumber,Line,Column);
|
UnmangleSourceLineNumber(El.SourceLinenumber,Line,Column);
|
||||||
|
if (Line=0) then
|
||||||
|
begin
|
||||||
|
if El is TPasUnresolvedSymbolRef then
|
||||||
|
exit('intrinsic');
|
||||||
|
end;
|
||||||
Result:=CurrentParser.Scanner.FormatPath(El.SourceFilename)+'('+IntToStr(Line);
|
Result:=CurrentParser.Scanner.FormatPath(El.SourceFilename)+'('+IntToStr(Line);
|
||||||
if Column>0 then
|
if Column>0 then
|
||||||
Result:=Result+','+IntToStr(Column);
|
Result:=Result+','+IntToStr(Column);
|
||||||
|
@ -324,19 +324,20 @@ Works:
|
|||||||
- currency:
|
- currency:
|
||||||
- as nativeint*10000
|
- as nativeint*10000
|
||||||
- CurA+CurB -> CurA+CurB
|
- CurA+CurB -> CurA+CurB
|
||||||
|
- CurA-CurB -> CurA-CurB
|
||||||
- CurA*CurB -> CurA*CurB/10000
|
- CurA*CurB -> CurA*CurB/10000
|
||||||
- CurA/CurB -> Math.floor(CurA/CurB*10000)
|
- CurA/CurB -> Math.floor(CurA/CurB*10000)
|
||||||
- CurA^^CurB -> Math.floor(Math.pow(CurA/10000,CurB/10000)*10000)
|
- CurA^^CurB -> Math.floor(Math.pow(CurA/10000,CurB/10000)*10000)
|
||||||
- Double:=Currency -> Double:=Currency/10000
|
- Double:=Currency -> Double:=Currency/10000
|
||||||
- Currency:=Double -> Currency:=Math.floor(Double*10000)
|
- Currency:=Double -> Currency:=Math.floor(Double*10000)
|
||||||
- jsvalue := currency -> jsvalue:=currency/10000
|
- jsvalue := currency -> jsvalue:=currency/10000
|
||||||
- simplify Math.floor(number) to trunc(number)
|
- simplify Math.floor(constnumber) to truncated constnumber
|
||||||
- Pointer of record
|
- Pointer of record
|
||||||
- p:=@r, p^:=r
|
- p:=@r, p^:=r
|
||||||
- p^.x, p.x
|
- p^.x, p.x
|
||||||
|
- dispose, new
|
||||||
|
|
||||||
ToDos:
|
ToDos:
|
||||||
- dispose, new
|
|
||||||
- 'new', 'Function' -> class var use .prototype
|
- 'new', 'Function' -> class var use .prototype
|
||||||
- btArrayLit
|
- btArrayLit
|
||||||
a: array of jsvalue;
|
a: array of jsvalue;
|
||||||
@ -344,8 +345,6 @@ ToDos:
|
|||||||
- bug:
|
- bug:
|
||||||
v:=a[0] gives Local variable "a" is assigned but never used
|
v:=a[0] gives Local variable "a" is assigned but never used
|
||||||
- setlength(dynarray) modeswitch to create a copy
|
- setlength(dynarray) modeswitch to create a copy
|
||||||
- range checks:
|
|
||||||
- case duplicates
|
|
||||||
- typecast byte(longword) -> value & $ff
|
- typecast byte(longword) -> value & $ff
|
||||||
- static arrays
|
- static arrays
|
||||||
- a[] of record
|
- a[] of record
|
||||||
|
@ -657,7 +657,13 @@ function(){
|
|||||||
<li>Since record types are JS objects it is possible to typecast a record type
|
<li>Since record types are JS objects it is possible to typecast a record type
|
||||||
to the JS Object, e.g. TJSObject(TPoint)</li>
|
to the JS Object, e.g. TJSObject(TPoint)</li>
|
||||||
<li>A pointer of record is simply a reference.
|
<li>A pointer of record is simply a reference.
|
||||||
E.g. <i>p:=@r</i> translates to <i>p=r</i>, <i>p^.x</i> becomes <i>p.x</i>.</li>
|
<ul>
|
||||||
|
<li><i>p:=@r</i> translates to <i>p=r</i></li>
|
||||||
|
<li><i>p^.x</i> becomes <i>p.x</i>.</li>
|
||||||
|
<li><i>New(PointerOfRecord)</i> creates a new record</li>
|
||||||
|
<li><i>Dispose(PointerOfRecord)</i> Sets the variable to null if possible.</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -2844,8 +2850,6 @@ End.
|
|||||||
<li>Resources</li>
|
<li>Resources</li>
|
||||||
<li>RTTI extended, $RTTI</li>
|
<li>RTTI extended, $RTTI</li>
|
||||||
<li>Runtime checks: Overflow -Co, $Q</li>
|
<li>Runtime checks: Overflow -Co, $Q</li>
|
||||||
<li>Runtime checks: Range -Cr, $R</li>
|
|
||||||
<li>Runtime checks: Typecast -CR</li>
|
|
||||||
<li>Type alias, e.g. type TTranslateString = type string;</li>
|
<li>Type alias, e.g. type TTranslateString = type string;</li>
|
||||||
<li>Variant records</li>
|
<li>Variant records</li>
|
||||||
<li>Variants</li>
|
<li>Variants</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user