summaryrefslogtreecommitdiff
path: root/compiler/pexpr.pas
Commit message (Collapse)AuthorAgeFilesLines
* * fix for Mantis #37426: don't allow an instance function of a type helper ↵svenbarth2021-04-021-3/+13
| | | | | | | | to be used on the type instead of a concrete value + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49102 3ad0048d-3df7-0310-abae-a5850022a9f2
* * correctly handle the case should the generic dummy symbol be a procsym ↵svenbarth2021-01-021-6/+23
| | | | | | instead of a typesym git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48001 3ad0048d-3df7-0310-abae-a5850022a9f2
* * when only a symbol name is provided to generate_specialization_phase1 ↵svenbarth2021-01-021-3/+3
| | | | | | allow a symbol table to be provided as well git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48000 3ad0048d-3df7-0310-abae-a5850022a9f2
* * also handle call nodes when determining the generic symbol for inline ↵svenbarth2021-01-021-0/+4
| | | | | | specializations git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47999 3ad0048d-3df7-0310-abae-a5850022a9f2
* * use a case statement instead of nested if-then statementssvenbarth2021-01-021-10/+11
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47998 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #38051: make Chr() a real intrinsics so that it can be used ↵svenbarth2020-11-081-2/+3
| | | | | | | | in type declarations as well + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47353 3ad0048d-3df7-0310-abae-a5850022a9f2
* * patch by Marģers to unify internal error numbers, resolves #37888florian2020-10-131-1/+1
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47103 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #37844: prefer to use the symtable determined in ↵svenbarth2020-10-121-1/+4
| | | | | | | | generate_specialization_phase1 for procdefs as that might a withsymtable that is needed to correctly load Self later on + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47101 3ad0048d-3df7-0310-abae-a5850022a9f2
* * do not set nonlocal for inter-procedural labels, this is not needed, ↵florian2020-09-201-4/+2
| | | | | | | | they use the jmpbuf to reach the target git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@46907 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #37650: apply adjusted patch by Ryan Joseph do not range ↵svenbarth2020-09-041-1/+6
| | | | | | | | check the length of ShortStrings if their length parameter is based on a generic constant + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@46766 3ad0048d-3df7-0310-abae-a5850022a9f2
* * reject the default Create array constructor if used on a variable instead ↵svenbarth2020-08-051-6/+16
| | | | | | | | of a type + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@46279 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #37251: apply patches by Bi0T1N to implement the ↵svenbarth2020-06-251-0/+10
| | | | | | | | IsConstValue() intrinsic + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45695 3ad0048d-3df7-0310-abae-a5850022a9f2
* * constrained type parameters are not undefined defs, resolves #37107florian2020-05-211-1/+1
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45457 3ad0048d-3df7-0310-abae-a5850022a9f2
* * If a nested procedure does not access its parent's frame pointer, optimize ↵yury2020-05-061-0/+2
| | | | | | | | it by removing the hidden $parentfp parameter. * Improved the tisogoto1.pp test. git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45292 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #35140: apply patch by Ryan Joseph together with some ↵svenbarth2020-04-251-2/+15
| | | | | | | | further changes by me to add support for constant parameters in generics + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45080 3ad0048d-3df7-0310-abae-a5850022a9f2
* * only resolve a dummy symbol if it is a type symbol (thus truly a dummy symbol)svenbarth2020-02-141-1/+1
| | | | | | + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44172 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #36631: it's an error if a POINT after an array is not ↵svenbarth2020-02-011-13/+23
| | | | | | | | followed by an identifier + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44082 3ad0048d-3df7-0310-abae-a5850022a9f2
* * better error recovery, resolves #36397florian2019-12-051-1/+6
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@43653 3ad0048d-3df7-0310-abae-a5850022a9f2
* + add support for the IsManagedType() intrinsics which reports for a type ↵svenbarth2019-11-061-3/+4
| | | | | | | | (or variable) whether it needs initialization/finalization + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@43409 3ad0048d-3df7-0310-abae-a5850022a9f2
* - remmoved doregister parameter from t*sym constructors, as the registrationjonas2019-09-141-2/+2
| | | | | | is handled automatically nowadays git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42998 3ad0048d-3df7-0310-abae-a5850022a9f2
* * instead of declaring another type with a 'attribute' suffix, *search* for ↵svenbarth2019-07-121-12/+41
| | | | | | | | another type with a 'ATTRIBUTE' suffix (Delphi allows declaring both a TFoo and TFooAttribute in the same unit) + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42362 3ad0048d-3df7-0310-abae-a5850022a9f2
* * change boolean parameters for try_consume_unitsym to a setsvenbarth2019-07-121-1/+7
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42360 3ad0048d-3df7-0310-abae-a5850022a9f2
* - Fix result type of SizeOf and BitSizeOf to use sizesint instead of sint.laksen2019-07-071-4/+4
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42337 3ad0048d-3df7-0310-abae-a5850022a9f2
* * synchronised with trunk till r42105jonas2019-05-191-1/+1
|\ | | | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@42106 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * fixed memory leakjonas2019-05-191-1/+1
| | | | | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42101 3ad0048d-3df7-0310-abae-a5850022a9f2
* | * synchronised with trunk till r42049jonas2019-05-121-3/+27
|\ \ | |/ | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@42050 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * fix case completeness and unreachable code warnings in compiler that wouldjonas2019-05-121-2/+10
| | | | | | | | | | | | be introduced by the next commit git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42046 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * fix for Mantis #35533: when searching for helpers on types that usually ↵svenbarth2019-05-101-1/+17
| | | | | | | | | | | | | | | | don't support a point operator, don't use automatic dereferentiation + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42036 3ad0048d-3df7-0310-abae-a5850022a9f2
* | * synchronised with trunk till r40776jonas2019-04-131-1/+1
|\ \ | |/ | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@41867 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * added extra header to ppu inside a subsection, so we won't run intojonas2019-04-061-1/+1
| | | | | | | | | | | | | | trouble when the ppu version hits 255 * also moved several ppu flags to a set inside that section git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@41846 3ad0048d-3df7-0310-abae-a5850022a9f2
* | * synchronised with trunk till r41537jonas2019-03-011-3/+1
|\ \ | |/ | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@41538 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * fixed over-eager rejection of tobjecttype.fieldname expression after r40785jonas2019-02-251-3/+1
| | | | | | | | | | | | (mantis #35149) git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@41474 3ad0048d-3df7-0310-abae-a5850022a9f2
* | * synchronised with trunk till r40942jonas2019-01-201-7/+43
|\ \ | |/ | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@40943 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * fixed several places where the interface crc could change:jonas2019-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | o unsetting po_inline while parsing the implementation for various reasons (interprocedural goto/label, accessing a local in a parent frame, having nested procedures) o instead handle this via the pio_inline_not_possible flag o noreturn can no longer be specified only in the implementation git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40789 3ad0048d-3df7-0310-abae-a5850022a9f2
| * * give an error when trying to call an object instance method via a type nodejonas2019-01-061-6/+42
| | | | | | | | | | | | (mantis #34821) git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40785 3ad0048d-3df7-0310-abae-a5850022a9f2
* | * synchronised with trunk till r40466jonas2018-12-041-1/+2
|\ \ | |/ | | | | git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@40467 3ad0048d-3df7-0310-abae-a5850022a9f2
| * + volatile() expression that marks an expression as volatilejonas2018-12-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * disable matching volatile references in the assembler optimisers, so they can't be removed (more conservative than needed, but better than removing too many) o the CSE optimiser will ignore them by default, because they're an unknown inline node for it * also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the right place git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40465 3ad0048d-3df7-0310-abae-a5850022a9f2
* | + fpc_eh_return_data_regno() intrinsic to get the return register numbersjonas2018-10-281-0/+9
|/ | | | | | for the Dwarf EH exception handler result git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@40070 3ad0048d-3df7-0310-abae-a5850022a9f2
* * handle widechar constants directly in the scanner, instead of in thejonas2018-10-211-1/+4
| | | | | | | overload selection (where you can't even know whether the string is a valid widechar constant) (mantis #33875) git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40009 3ad0048d-3df7-0310-abae-a5850022a9f2
* * allow nil to be assigned to generic types, resolves #34037florian2018-10-141-1/+1
| | | | | | * niln is also a constant node git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39934 3ad0048d-3df7-0310-abae-a5850022a9f2
* * compilation fixedflorian2018-09-261-1/+2
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39812 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for Mantis #34287: correctly handle "inherited method" calls if ↵svenbarth2018-09-211-57/+117
| | | | | | | | "method" is a generic (no matter if it's mode Delphi or not) + added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39787 3ad0048d-3df7-0310-abae-a5850022a9f2
* * do_member_read() takes ownership of the specialization context, so Nil it ↵svenbarth2018-08-031-0/+1
| | | | | | after the call git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39559 3ad0048d-3df7-0310-abae-a5850022a9f2
* * accept dereferences in generics definitions, resolves #33700 properlyflorian2018-07-131-1/+1
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39447 3ad0048d-3df7-0310-abae-a5850022a9f2
* * also parse postfix operators after parsing a _STRING token (required for ↵svenbarth2018-07-061-1/+9
| | | | | | | | class functions on type helpers for String) + added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39399 3ad0048d-3df7-0310-abae-a5850022a9f2
* + support TP7-compatible @proc^ (as in FillChar(@proc^,...))nickysn2018-06-291-4/+27
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39343 3ad0048d-3df7-0310-abae-a5850022a9f2
* * the 'again' parameter of factor_read_id() changed to 'out' instead of 'var'nickysn2018-06-271-1/+1
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39317 3ad0048d-3df7-0310-abae-a5850022a9f2
* * the symbol parsed for "specialize" does not need to be a type; it could be ↵svenbarth2018-06-151-2/+1
| | | | | | a procsym or some other type (e.g. a constant of the same name in a third unit) git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39233 3ad0048d-3df7-0310-abae-a5850022a9f2
* * also pass the pattern with which the potential unit/namespace symbol had ↵svenbarth2018-05-051-1/+1
| | | | | | been found to try_consume_unitsym*() git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@38913 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved nf_typedaddr to addrnodeflags (anf_typedaddr)nickysn2018-04-031-1/+1
| | | | git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@38671 3ad0048d-3df7-0310-abae-a5850022a9f2