mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:09:23 +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
|
||||
if El=nil then exit('nil');
|
||||
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);
|
||||
if Column>0 then
|
||||
Result:=Result+','+IntToStr(Column);
|
||||
|
@ -324,19 +324,20 @@ Works:
|
||||
- currency:
|
||||
- as nativeint*10000
|
||||
- CurA+CurB -> CurA+CurB
|
||||
- CurA-CurB -> CurA-CurB
|
||||
- CurA*CurB -> CurA*CurB/10000
|
||||
- CurA/CurB -> Math.floor(CurA/CurB*10000)
|
||||
- CurA^^CurB -> Math.floor(Math.pow(CurA/10000,CurB/10000)*10000)
|
||||
- Double:=Currency -> Double:=Currency/10000
|
||||
- Currency:=Double -> Currency:=Math.floor(Double*10000)
|
||||
- jsvalue := currency -> jsvalue:=currency/10000
|
||||
- simplify Math.floor(number) to trunc(number)
|
||||
- simplify Math.floor(constnumber) to truncated constnumber
|
||||
- Pointer of record
|
||||
- p:=@r, p^:=r
|
||||
- p^.x, p.x
|
||||
- dispose, new
|
||||
|
||||
ToDos:
|
||||
- dispose, new
|
||||
- 'new', 'Function' -> class var use .prototype
|
||||
- btArrayLit
|
||||
a: array of jsvalue;
|
||||
@ -344,8 +345,6 @@ ToDos:
|
||||
- bug:
|
||||
v:=a[0] gives Local variable "a" is assigned but never used
|
||||
- setlength(dynarray) modeswitch to create a copy
|
||||
- range checks:
|
||||
- case duplicates
|
||||
- typecast byte(longword) -> value & $ff
|
||||
- static arrays
|
||||
- a[] of record
|
||||
|
@ -657,7 +657,13 @@ function(){
|
||||
<li>Since record types are JS objects it is possible to typecast a record type
|
||||
to the JS Object, e.g. TJSObject(TPoint)</li>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@ -2844,8 +2850,6 @@ End.
|
||||
<li>Resources</li>
|
||||
<li>RTTI extended, $RTTI</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>Variant records</li>
|
||||
<li>Variants</li>
|
||||
|
Loading…
Reference in New Issue
Block a user