Commit Graph

75 Commits

Author SHA1 Message Date
Sven/Sarah Barth
5c890b59e3 * fix #40655: apply changes to packrecords, packenum and setalloc using the recordpending*() functions so that they are applied correctly in case of them being used directly after a {$POP}{$PUSH} sequence
+ added test
2024-02-20 23:52:52 +01:00
Sven/Sarah Barth
6cbbf9c52a * $P/$OpenStrings is supposed to be a local switch, so change that accordingly
+ added tests
2022-10-08 13:52:32 +02:00
florian
d2a1f9cb20 * get rid of cs_opt_none
* $O+ sets cs_opt_level2 instead of cs_opt_none which made no sense
2022-06-18 20:13:03 +02:00
svenbarth
be0d51d64c * allow $MinEnumSize, $PackSet and $PackRecords to be used with $Push and $Pop
+ added tests

git-svn-id: trunk@39215 -
2018-06-12 19:40:45 +00:00
svenbarth
da672d1344 * instead of using separate booleans use a set to keep track of pending changes for popped settings
git-svn-id: trunk@39214 -
2018-06-12 19:40:41 +00:00
florian
f61b074912 * (re)store alignment when doing a $push/$pop
git-svn-id: trunk@38020 -
2018-01-22 21:06:07 +00:00
svenbarth
86b9381673 Add new Delphi compatible switch {$G+/-}, {$IMPORTEDDATA ON/OFF} which handles generation of indirect references for cross unit variable accesses if needed for the target.
globtype.pas:
  + tlocalswitch: extend by cs_imported_data
globals.pas:
  * default_settings: cs_imported_data is set by default (Delphi compatible)
switches.pas:
  * turboSwitchTable: G is used for cs_imported_data
scandir.pas:
  + new directive handler dir_importeddata
  * InitScannerDirectives: handle IMPORTEDDATA with dir_importeddata

git-svn-id: trunk@33281 -
2016-03-18 22:04:57 +00:00
Jonas Maebe
f5a3bab7d4 * add llvminfo to override optimizer switches in case of {$ifdef llvm}
git-svn-id: trunk@32901 -
2016-01-10 14:01:35 +00:00
nickysn
b26e10d53c + generate proper win16 prologue/epilogue for exported routines (we don't yet
actually export them from the .exe or .dll, but they can now be used as
  callbacks)
+ support win16 smart callbacks via the $K switch

git-svn-id: trunk@31835 -
2015-09-26 18:04:59 +00:00
nickysn
ae533e4c77 + made the $W switch control the FarProcsPushOddBP target switch in the i8086
compiler (BP7 compatibility) instead of controlling stack frame elimination
  (which isn't supported by the compiler on i8086 anyway, due to i8086's lack
  of support for stack relative addressing)

git-svn-id: trunk@31834 -
2015-09-26 15:41:44 +00:00
nickysn
86b9a0eed1 + added the $F switch to the turbo and macSwitchTable, as that takes precedence
over dir_forcefarcalls

git-svn-id: trunk@27561 -
2014-04-13 15:14:43 +00:00
Jonas Maebe
28c20cfc5e * the default string type for the JVM target is no longer automatically
unicodestring = java.lang.String. The reason this was the default in
    the past is that this was the first string type that was implemented,
    and without it being the default most code involving string operations
    would fail. Now the default strings types are the same as for other
    targets
  + new {$modeswitch unicodestrings} directive, that when activated
    *together* with {$h+},
   1) changes char into an alias for widechar
   2) changes string into an alias for unicodestring
   3) changes the preferred string evaluation type (in case of uncertainty)
      to unicodestring
    {$modeswitch unicodestrings} with {$h-} does not change anything at all
    regarding the string type (it still changes the char type)
  + new uuchar unit that redefines char as widechar, and which is automatically
    included by the compiler if {$modeswitch unicodestrings} is enabled

git-svn-id: branches/jvmbackend@18781 -
2011-08-20 08:35:47 +00:00
pierre
d707d38ea1 * Fix double WARN infinite loop
git-svn-id: trunk@17864 -
2011-06-29 09:52:03 +00:00
pierre
d09389ac79 Implement support for $WARN XXX ON/OFF/ERROR
* globtype.pas:
  tmsgstate updated (ms_on/off/error_global variants added).
  ms_local_mask, ms_global_mask : new constants.
  tmessagestaterecord: new record, use to list chains
  of local changes to warnings by $WARN directive.
  pmessagestaterecord: new pointer to tmessagestaterecord.

  * globals.pas:
    tsettings record:
    new field: pmessage of type pmessagestaterecord;

  * cmsgs.pas:
  TMessage class:
  New method: ResetStates; Called on unit parsing changes
  New Method: SetVerbosity(nr:longint;newstate:tmsgstate):boolean;
  Remember global state in
  replacing ClearVerbosity method.
  New boolean field:  has_local_changes
  set if a call to SetVerbosity makes a local change that must be
  reset when changing unit.

  * verbose.pas:
  New functions/procedures:
  function  SetMessageVerbosity(v:longint;state:tmsgstate):boolean;
  for changes caused by $WARN or option
  procedure RestoreLocalVerbosity(pstate : pmessagestaterecord);
  procedure FreeLocalVerbosity(var fstate : pmessagestaterecord);
  function ChangeMessageVerbosity(s: string; var i: integer;state:tmsgstate): boolean;

  * switches.pas:
  Implement recordpendingmessagestate
  flushpendingswitchesstate: Handle new pmessage field of
  current_settings record.

  * parser.pas:
  Handle pmessage field of current_settings.

  * scandir.pas:

  Handle also integer constants in $WARN.

git-svn-id: trunk@17852 -
2011-06-28 10:03:07 +00:00
paul
a8381c8b32 fpc: compiler:
- complete $WARN switch parsing and add a stab to change message state
  - reimplement way of message hiding by -vm switch (by Dmitry Boyarintsev)
(note: $WARN switch does not work at the moment since state handling is not yet implemented)

git-svn-id: trunk@14809 -
2010-01-27 06:59:58 +00:00
Jonas Maebe
a7e02c7948 * check validity of calling conventions specified using {$calling x}
(previously, this was only checked for calling conventions specified
     as a procedure directive)

git-svn-id: trunk@12944 -
2009-03-21 21:21:45 +00:00
Jonas Maebe
bf7c9361f6 * delay effect of {$calling x} until switches are flushed (mantis #12985)
git-svn-id: trunk@12932 -
2009-03-20 16:27:56 +00:00
Jonas Maebe
e5920bc2b8 * delay verbosity changes just like localswitches changes
* store a node's verbosity in the node so that e.g. disabling warnings
    also disables warnings for this node in pass_1
   (the above together fix mantis #12076)
  * save/restore verbosity with {$push}/{$pop} (mantis #12075)
  * if warnings/notes/hints are turned off, also do not count encountered
    ones for the totals (otherwise -Sew cannot be used properly in
    combination with {$warnings off}, because disabled warnings will still
    trigger a compiler error) -- this required adding -vw/-vn/-vh to all
    tests using -Sew/-Sen/-Seh
  - removed some superfluous state saving/restoring from firstpass()

git-svn-id: trunk@12025 -
2008-11-03 21:18:27 +00:00
florian
c7100799ed + forbid usage of $E on targets supporting no fpu emulation
- disabled -Cfsoft on i386

git-svn-id: trunk@7625 -
2007-06-10 17:03:26 +00:00
Jonas Maebe
4765364816 * don't give a warning for {$u-} (means "Pentium-safe fdiv off", is only
behaviour that fpc supports)

git-svn-id: trunk@6171 -
2007-01-24 19:49:16 +00:00
Jonas Maebe
c9148d67a9 * support for {$z+/-} (={$z4/1})
git-svn-id: trunk@6109 -
2007-01-21 22:08:53 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
2888a21593 * list supported optimization options in -i
* support $OPTIMIZATION and $O+

git-svn-id: trunk@2904 -
2006-03-13 11:17:56 +00:00
peter
632bdcd149 * $W switch sets the localswitch cs_generate_stackframes that can be
used in the future

git-svn-id: trunk@1487 -
2005-10-19 05:50:26 +00:00
peter
89297d2c39 * move all stabs ($ifdef gdb) code to dbgstabs
git-svn-id: trunk@1255 -
2005-10-02 11:17:05 +00:00
florian
08f0419e3e + $A similiar to $align on/off added
git-svn-id: trunk@551 -
2005-07-01 18:49:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
olle
c2be1fd337 * made macpas switches in sync with turbo switches 2005-01-04 18:39:06 +00:00
peter
d763f9e142 browser disabled
uf_local_symtable ppu flag when a localsymtable is stored
2004-08-27 21:59:26 +00:00
olle
41bdd6178c + added external facilities for macpas 2004-07-14 23:19:21 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
peter
bd07b65cfd * don't turn off debuginfo when line info is requested 2003-12-03 17:45:36 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
3bcfe33002 * fixed stackcheck that would be called recursively when a stack
error was found
  * generic changeregsize(reg,size) for i386 register resizing
  * removed some more routines from cga unit
  * fixed returnvalue handling
  * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
2002-04-15 19:44:18 +00:00
peter
7781fca6bd * read only typed const support, switch $J- 2001-10-20 20:30:20 +00:00
peter
1866044949 * $E is moduleswitch (merged) 2001-05-18 22:56:05 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
peter
a71e44ac49 * use defines.inc 2000-09-24 15:06:10 +00:00
Jonas Maebe
4171877126 + support for full boolean evaluation (b+/b-), default remains short
circuit boolean evaluation
2000-09-21 11:30:49 +00:00
peter
4c94659743 * moved some util functions from globals,cobjects to cutils
* splitted files into finput,fmodule
2000-08-27 16:11:48 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00
michael
e7aca136a1 + Initial import 2000-07-13 06:29:38 +00:00
pierre
1d982ffbf6 * fix problem when modifying several local switches in a row 2000-05-09 21:31:50 +00:00
pierre
eb59e0b11c * fix for tests/test/testrang.pp bug 2000-05-03 14:36:57 +00:00
peter
4a4a24b6e8 * log truncated 2000-02-09 13:22:42 +00:00