Commit Graph

383 Commits

Author SHA1 Message Date
Frederic Kehrein
ba55932929 Fixing trying to consume ID for anonymous switch field 2023-09-28 22:42:49 +00:00
Nikolay Nikolov
fce34eb4bf + disallow WebAssembly reference types in records, objects and classes 2023-06-20 15:13:15 +03:00
Jonas Maebe
7f41bb4718 JVM: add typesym for anonymous record typed constants
Fixes compilation of system unit with JVM compiler after b38d13577f
2023-02-05 10:58:59 +01:00
Sven/Sarah Barth
d1d0afe337 * handle_calling_convention is only needed for a function reference used in a record/class/object when it's an anonymous one 2022-09-16 14:32:25 +02:00
Sven/Sarah Barth
c43f671baa * check whether the hdef is still a procvardef before accessing it as such 2022-09-16 14:31:57 +02:00
Sven/Sarah Barth
62a57bf82e * fix #39903: correctly parse anonymous function references in records (and classes/objects)
+ added test
2022-09-15 22:57:05 +02:00
Ondrej Pokorny
761f65cef8 do not publish enums with jumps - keep error on static properties 2022-08-16 22:41:25 +02:00
Ondrej Pokorny
55629aeb19 do not publish enums with jumps 2022-08-16 20:47:44 +02:00
florian
ceda27ae25 * allow type parameters in variant parts of records as we do not now
what type is used during specialization, resolves #39805
2022-06-28 22:45:17 +02:00
Jonas Maebe
60b0bc5535 read_record_fields: fix overflows of variant record size variables
Could happen in case of > 32 bit variant parts, or variant parts at offsets
> 32 bit offsets.

Fixes webtbs/tw9039c with a compiler compiled with -Cr
2022-05-29 13:33:27 +02:00
Sven/Sarah Barth
533a11ec80 * correctly handle calling convention for function references 2022-05-26 21:43:39 +02:00
Sven/Sarah Barth
e8b0fc88e3 * correctly handle directives for function references 2022-05-26 21:43:37 +02:00
Sven/Sarah Barth
2ed2c21313 + add support for parsing function references 2022-05-26 21:42:59 +02:00
Sven/Sarah Barth
0bbfad1add * apply patch by Blaise.ru:
- avoid creation of a dummy typesym just to call parse_var_proc_directives() by introducing a new parse_proctype_directives() that takes a tprocvardef instead of a symbol like the former does
  - have parse_var_proc_directives() call parse_proctype_directives() to avoid duplicated code
2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
3aebcccdf2 * allow procvars to not be registered right away 2022-05-26 21:42:52 +02:00
Pierre Muller
5acd7a7b83 Rename tsymtable.insert and delete methods to insertsym ands deletesym 2022-05-03 23:00:28 +02:00
florian
ae89261008 * prevent that a absolute symbol references itself, resolves #39604 2022-03-06 22:01:56 +01:00
Jonas Maebe
15865e7602 Record variant discriminators: check types 2021-10-31 21:13:35 +01:00
nickysn
ea5ffd597f * set self to nil in current_module.deflist for registered defs in the
tstoreddef.destroy destructor, instead of doing it after each call to
  x.owner.deletedef(x)

git-svn-id: trunk@49417 -
2021-05-30 21:27:57 +00:00
nickysn
81bd473439 * fixed win32 testsuite regressions after r49084
git-svn-id: trunk@49175 -
2021-04-10 21:05:58 +00:00
nickysn
8ec71bc810 * fixed memory leak, introduced accidentally in r48998
git-svn-id: trunk@49084 -
2021-03-30 11:05:00 +00:00
nickysn
d608b4b689 * instead of registering all and then deleting non-propgetter/setter procdefs in
pdecvar.read_property_dec, don't register them by default, and then only
  register them, if they are propgetter/setter. This prevents dangling pointers
  in current_module.deflist and potential use-after-free bugs.

git-svn-id: trunk@48998 -
2021-03-17 19:16:38 +00:00
nickysn
811cf381ad * when parsing unions, set the uniondef reference to nil in
current_module.deflist after freeing the object to prevent dangling pointers
  and use after free

git-svn-id: trunk@48986 -
2021-03-15 18:13:45 +00:00
Jonas Maebe
e7d1a77f9a * rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
  * repurpose the AArch64/Darwin target for AArch64/macOS
   o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler

git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
svenbarth
60345366f2 * fix for Mantis #35140: apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
+ added tests

git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
Jonas Maebe
a051b8d225 - remmoved doregister parameter from t*sym constructors, as the registration
is handled automatically nowadays

git-svn-id: trunk@42998 -
2019-09-14 17:30:45 +00:00
Jonas Maebe
d8903ce6b3 - removed maxcrecordalign parameter/field from recordsymtables, as this value
cannot be modified in the settings (so we can directly use the one from
    current_settings)

git-svn-id: trunk@42447 -
2019-07-14 19:24:32 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
ed2ae508d0 * only add hidden parameters for objectdef methods after generating the vmt,
so that they take into account inherited calling conventions (mantis #35233)
   o don't needlessly calculate the paraloc info when generating a JVM mangled
     name

git-svn-id: trunk@41716 -
2019-03-16 19:14:14 +00:00
yury
a277a5f8db * Removed unused local vars.
git-svn-id: trunk@41457 -
2019-02-25 11:22:49 +00:00
Jonas Maebe
91d5457b38 * moved around/replaced the following procedures to stop nflw from depending
on pdecsub (node units should not depend on parser units):
   o maybe_add_public_default_java_constructor()
   o handle_calling_convention()
   o create_finalizer_procdef() (replaced with create_outline_procdef())
   o insert_record_hidden_paras()
   o handle_calling_convention()
   o proc_add_definition()
   o build_parentfpstruct()
   o maybe_guarantee_record_typesym()
   o get_first_proc_str()
  * factored out the creation of a procinfo for a nested procdef based on a
    subnodetree of the current procdef into tprocinfo.create_for_outlining()

git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
28df55fe08 * moved handle_calling_convention() to pparautl
git-svn-id: trunk@40772 -
2019-01-05 16:26:29 +00:00
svenbarth
539ed761ba * a property access list must only consist of record or object fields; classes are not allowed
git-svn-id: trunk@40656 -
2018-12-26 11:26:01 +00:00
svenbarth
446f89719c * move checking whether a field's type is valid for the field to a separate function
git-svn-id: trunk@40284 -
2018-11-11 22:08:24 +00:00
Jonas Maebe
0b246f3dbd * converted Boolean8 to an internal type, and mapped Boolean to the
new internal pasbool1(type) (part of mantis #34411)
   o apply the _Bool x86-64 parameter passing rules only to pasbool1

git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
florian
b70fc52874 * patch by Ondrej Pokorny: the stored property modifier does not delete the inherited default value anymore, resolves #33564
git-svn-id: trunk@39357 -
2018-07-01 20:11:13 +00:00
florian
eb61923762 * patch by Ondrej Pokorny: The nodefault is now inherited from parent class, resolves #33563
git-svn-id: trunk@39356 -
2018-07-01 19:01:41 +00:00
svenbarth
89f42fcdae * handle vd_threadvar inside read_record_fields()
git-svn-id: trunk@39285 -
2018-06-23 13:49:01 +00:00
florian
6d5ce55232 * unified def creation for open arrays
git-svn-id: trunk@38408 -
2018-03-04 17:59:05 +00:00
florian
14cb60e479 * set an owner for open array defs being created in property declarations, resolves #25769
git-svn-id: trunk@38348 -
2018-02-25 17:36:34 +00:00
florian
ad4ad82908 * prevent crash on not yet supported attribute declarations, resolves #32075
git-svn-id: trunk@38272 -
2018-02-17 19:57:50 +00:00
michael
f6a08a2c74 * Patch from Ondrej Pokorny to allow correct nodefault/stored for strings
git-svn-id: trunk@37954 -
2018-01-13 10:22:16 +00:00
nickysn
49a96af874 + also support 'external near' var declarations on i8086
git-svn-id: trunk@37536 -
2017-10-30 21:52:03 +00:00
nickysn
303309b28f + added support for 'external far' variables for i8086
git-svn-id: trunk@37532 -
2017-10-30 18:03:44 +00:00
florian
c0feaf1f1e + allow absolute to absolute symbols, resolves issue #32474
git-svn-id: trunk@37379 -
2017-10-01 19:54:44 +00:00
maciej-izak
8b5524ac3a * ignore is_publishable for properties in interfaces (related to $M+ directive). $M has effect on visibility of default section for classes. Interface has always only public section (fix for problem in tb0631.pp)
git-svn-id: trunk@37136 -
2017-09-03 19:05:21 +00:00
svenbarth
ad65ff5600 * insert symbol only once
git-svn-id: trunk@36620 -
2017-06-30 15:59:33 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
Károly Balogh
464ecab542 huge syscall support refactor for Amiga-likes. removed large chunks of ancient duplicated code, and in general tried to make the entire thing more maintainable and cleaner. also added support for AROS EAXBase syscall convention
git-svn-id: trunk@34416 -
2016-09-03 07:57:23 +00:00
svenbarth
bf3c7144b0 * make not of public assembler symbols for variables and classes if necessary
git-svn-id: trunk@34291 -
2016-08-12 14:19:11 +00:00