inline nodes, which should generate better code for certain CPU targets,
including x86. Note that the optimization isn't applied yet for all integer
types (those that have extra implicit typecasts, inserted by the compiler,
aren't handled yet).
git-svn-id: trunk@35685 -
- assigned(array)
- open array: override, pass array literal, pass var
- reporting type mismatches shows full path if necessary
- fixed comparing basetype from different units
- types with unitname
git-svn-id: trunk@35681 -
- ord(char), chr()
- typecast boolean to integer
- typecast integer to boolean
- open arrays, same as dynamic arrays
- Pascal descendant of external class can define a newinstance class
function
- allow to type cast any class to any root class
- jsvalue
- init as undefined
- assign to jsvalue := integer, string, boolean, double, char
- type cast base types to jsvalue
- type cast jsvalue to base type
integer: Math.floor(jsvalue)
boolean: !(jsvalue == false)
double: rtl.getNumber(jsvalue)
string: ""+jsvalue
char: rtl.getChar(jsvalue)
- enums: assign to jsvalue, typecast jsvalue to enum
- class instance: assign to jsvalue, typecast jsvalue to a class
- class of: assign to jsvalue, typecast jsvalue to a class-of
- array of jsvalue
- parameter, result type, assign from/to untyped
git-svn-id: trunk@35668 -
pastree: fixed double iterations in foreach
parser: fixed skipping token after var declaration without checking
pasresolver:
- ord(char), chr()
- method visibility: warn and fix if override has lower visibility
- open arrays
- allow descendants to add their own base types
- typecast to alias type
pasuseanalyzer: support public modifier
git-svn-id: trunk@35667 -
op=and/or/xor). They generate more optimal code on certain architectures
(including x86). The new inline nodes aren't generated by the compiler yet,
but will be used in the future, at certain optimization levels, whenever the
pattern x:=x op y is detected by the compiler.
git-svn-id: trunk@35666 -
- fixed procedure modifier public
- fixed setting pmPublic when 'public' behind a procedure starts a class
visibility section
git-svn-id: trunk@35652 -
- class external:
- JS object or function as ancestor
- does not descend from TObject
- all members become external. case sensitive
- has no hidden values like $class, $ancestor, $unitname, $init, $final
- can be ancestor of a pascal class (not descend from TObject).
- pascal class descendant can override methods
- property works as normal, replaced by getter and setter
- class-of
- class var/function: works as in JS.
- is and as operators
- destructor forbidden
- constructor must not be virtual
- constructor 'new' -> new extclass(params)
- identifiers are renamed to avoid clashes with external names
- call inherited
git-svn-id: trunk@35643 -
- a.b.c is now stored as (a.b).c, which makes restructuring easier.
- fixed closing a type section before a procedure is parsed.
git-svn-id: trunk@35641 -
pasresolver: checking all varargs arguments
pasresolver: checking arguments are readable
fppas2js: fixed using externals from other units
git-svn-id: trunk@35631 -