Commit Graph

25 Commits

Author SHA1 Message Date
svenbarth
4b7f92a367 Merged revision(s) 48972, 49057 from trunk:
+ tx64tryfinallynode.dogetcopy properly implemented, resolves #37305
........
  * patch by Do-wan Kim: fix loop unrolling for try .. finally blocks in win32,
    similiar to r48972 for win64
........

git-svn-id: branches/fixes_3_2@49316 -
2021-05-01 15:48:45 +00:00
svenbarth
63e2259556 Merged revision(s) 42673, 47066, 47070 from trunk:
* x86_64: Fixed code generation for try..finally blocks, so that exit label from inner try..finally stays within scope of procedure's implicit try..finally block if one is present. Mantis #34772.

........
  * patch by J. Gareth Moreton: propagate exit use in nested try...except statements,
    resolves #35841
........
  * fix #35841 also for break and continue
........

git-svn-id: branches/fixes_3_2@47589 -
2020-11-25 22:20:21 +00:00
Jonas Maebe
3ac703506c * rest of the previous accidental partial commit
git-svn-id: branches/fixes_3_2@41250 -
2019-02-07 19:56:21 +00:00
pierre
23b9dde397 Merge of commits 40142, 40189 and 40347
------------------------------------------------------------------------
r40142 | jonas | 2018-11-01 13:19:33 +0000 (Thu, 01 Nov 2018) | 2 lines

  * ttryfinallynode now inherits from tbinarynode instead of tloopnode, as its
    t1 field was always set to tnothingnode
------------------------------------------------------------------------
--- Merging r40142 into '.':
U    compiler/i386/n386flw.pas
U    compiler/nflw.pas
U    compiler/x86_64/nx64flw.pas
U    compiler/nutils.pas
U    compiler/ppu.pas
U    compiler/ncgflw.pas
U    compiler/psub.pas
--- Recording mergeinfo for merge of r40142 into '.':
 U   .
------------------------------------------------------------------------
r40189 | jonas | 2018-11-02 21:12:18 +0000 (Fri, 02 Nov 2018) | 2 lines

  * fixed overzealous removal of an assigned(t1) check in r40142 (it was for a
    ttryexceptnode instead of for a ttryfinally node)
------------------------------------------------------------------------
--- Merging r40189 into '.':
G    compiler/x86_64/nx64flw.pas
--- Recording mergeinfo for merge of r40189 into '.':
 G   .
------------------------------------------------------------------------
r40347 | pierre | 2018-11-18 10:32:13 +0000 (Sun, 18 Nov 2018) | 3 lines

  * Use getasizeint/putasizeint for tfieldvarsym.fieldoffset 
  * Change CurrentPPUVersion

------------------------------------------------------------------------
--- Merging r40347 into '.':
G    compiler/ppu.pas
U    compiler/utils/ppuutils/ppudump.pp
U    compiler/symsym.pas
--- Recording mergeinfo for merge of r40347 into '.':
 G   .

git-svn-id: branches/fixes_3_2@40717 -
2018-12-31 16:15:55 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
Jonas Maebe
b14c037533 * record in the flowcontrol flags whether we are currently in a block whose
exceptions are caught in the current routine (fc_catching_exceptions),
    so that for LLVM we will be able to use "invoke" instead of "call" in that
    case

git-svn-id: trunk@35158 -
2016-12-18 13:57:33 +00:00
Jonas Maebe
880d438704 * renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
inherit from it for LLVM without a thousand ifdefs

git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +00:00
svenbarth
fc5ce63134 * fix for Mantis #30832: instead of checking a procdef's struct for df_generic check the procdef itself, this way global generic methods or generic methods that are part of non-generic classes or records are caught as well.
+ added test

git-svn-id: trunk@34914 -
2016-11-18 14:01:03 +00:00
Jonas Maebe
aa1be3276f - removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
it was AT_NONE, which is invalid and should never be used
  * explicitly pass the correct value for all calls to those methods elsewhere
    in the compiler

git-svn-id: trunk@34250 -
2016-08-05 07:09:16 +00:00
svenbarth
529677cc79 ncal.pas:
* extend tcallnode with the ability to pass a tspecializationcontext so that tcallcandidates can do a final specialization
  * the final procdef is registered at the end of tcallnode.pass_typecheck

git-svn-id: trunk@31763 -
2015-09-18 14:48:54 +00:00
sergei
e542800ea9 * Win64 SEH: Track control flow out of unwind-protected regions in a more precise way and don't generate expensive calls to __fpc_local_unwind when not necessary.
git-svn-id: trunk@31582 -
2015-09-09 18:43:46 +00:00
sergei
5cfeaedd23 * Fixed copy&paste error introduced in r24398, resolves #28584.
git-svn-id: trunk@31475 -
2015-09-01 14:06:02 +00:00
sergei
ed4e876f4f * Generate exception filters data on i386-win32 and x86_64-win64 without using global labels.
git-svn-id: trunk@29512 -
2015-01-20 13:52:19 +00:00
sergei
3fb304cbe2 - Removed Win64 SEH code specific to results of managed types returned in registers. Since r26228 managed types are always returned in parameters.
git-svn-id: trunk@27162 -
2014-03-16 15:48:49 +00:00
Jonas Maebe
6a4afd3a33 * changed uses of "exit" in constructors to if/then constructs, to
avoid the constructor result/SSA bug in 2.6.x

git-svn-id: trunk@26651 -
2014-02-02 09:09:51 +00:00
sergei
1ee9373fa6 * Changed function create_pd into method of ttryfinallynode, so it can be reused for Win32 SEH and, in the future, for DWARF-based exception handling on other targets.
* Additional two minor changes: reset po_delphi_nested_cc on result, so it is independent of current {$modeswitch nestedprocvar} state, and removed call to alloc_proc_symbol (which belongs to pass 2).

git-svn-id: trunk@26222 -
2013-12-12 08:38:06 +00:00
florian
e914612423 * the win64 exception handling code messes with asm nodes, so mark the helper procedure that they contain assembler
git-svn-id: trunk@26162 -
2013-12-01 17:02:13 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
sergei
3ce0b33302 * Win64 SEH: when creating a finalization procedure, put its def into the same symtable with sym. By default, defs are added into symtablestack.top, which may be set to something temporary like exceptsymtable. In such cases it is possible that def is destroyed before sym, leaving sym with invalid pointers.
git-svn-id: trunk@26077 -
2013-11-13 12:27:27 +00:00
nickysn
bf07fc077b * specify AT_DATA in all references to the tobjectdef.vmt_mangledname symbol.
This fixes a lot of bugs, related to objects and classes in the i8086 medium
  memory model

git-svn-id: trunk@25794 -
2013-10-15 18:56:27 +00:00
sergei
8c91cddfc8 * Win64 SEH: Fixed handling control flow statements also in 'except' and 'on' parts of try..except statements.
git-svn-id: trunk@24398 -
2013-05-01 01:47:01 +00:00
sergei
c7937f6736 * Win64 exception handling: don't reset fc_unwind control flow flag at the beginning of try..except blocks. Resolves #24342.
git-svn-id: trunk@24385 -
2013-04-30 03:56:58 +00:00
florian
a07af824ea * properly fix raise node handling on x86-64 after r24288
git-svn-id: trunk@24334 -
2013-04-26 20:17:54 +00:00
sergei
cb1098c26c * Do not create SEH finalization procedures in generic methods, their similarity with nested procedures causes compilation errors because actual nested procedures are not allowed for generics. Not creating them doesn't hurt because generic node tree is not used for code generation. Resolves #23724.
git-svn-id: trunk@23519 -
2013-01-25 18:50:04 +00:00
sergei
cbad0abab5 + Platform-specific exception support for x86_64-win64. Enable by cycling with OPT=-dTEST_WIN64_SEH.
git-svn-id: trunk@20098 -
2012-01-16 23:13:31 +00:00