Commit Graph

39229 Commits

Author SHA1 Message Date
paul
f9277d2043 compiler: add comment for all application types
git-svn-id: trunk@23602 -
2013-02-13 02:05:07 +00:00
paul
8db6118965 compiler: define FPC_UNICODESTRINGS when UnicodeString is a default string type (for issue #0023861)
git-svn-id: trunk@23601 -
2013-02-13 01:02:40 +00:00
paul
0be1f4d23d rtl: missing FPC_UNICODESTRING_TYPE_DEFINED define
git-svn-id: trunk@23600 -
2013-02-13 00:16:11 +00:00
lacak
b12fad63d4 fcl-db: bufdataset: rename local variable (to avoid confusion between FFilterBufer and FilterBuffer and Buffer vs. Record)
git-svn-id: trunk@23599 -
2013-02-12 12:30:04 +00:00
lacak
81f15610d6 fcl-db: bufdataset: small reprocessing
- adapt method ProcessFieldsToCompareStruct - initialise DBCompareStruct in one place all fields. Used by BuildIndex and Locate.
- add new method BufferOffset - returns offset of buffer data from begining of memory record  = ( sizeof(TBufRecLinkItem) * FMaxIndexesCount )

git-svn-id: trunk@23598 -
2013-02-12 12:24:47 +00:00
svenbarth
12f3a21f09 Fix passing of Doubles on m68k processors that don't have FPU support.
m68k/cgcpu.pas, tcg68k:
	+ overload "a_loadfpu_ref_cgpara" and use the 64-bit code generator to pass Doubles if they are located in references

Fixes around nearly 100 tests.

git-svn-id: trunk@23597 -
2013-02-12 11:04:20 +00:00
svenbarth
489e038379 Disallow "protected" and "strict protected" in extended records (Delphi compatible).
ptype.pas, parse_record_members:
  * write an error message if "protected" or "strict protected" is encountered
msg/errore.msg:
  + add an error message for disallowed "things" in records

+ added test
* adjusted test (note: according to the bug report this test did not originally have the "protected" section, but it was added by Paul before commiting)

git-svn-id: trunk@23596 -
2013-02-11 18:46:47 +00:00
lacak
7dc1814b7a fcl-db: formatting (charcase, method ordering)
git-svn-id: trunk@23595 -
2013-02-11 12:14:36 +00:00
michael
aca21b0b60 * Attempt to create directory, fail if not possible
git-svn-id: trunk@23593 -
2013-02-11 08:15:13 +00:00
lacak
1b9842c33a fcl-db: bufdataset: when new record is inserted or existing edited and some sorted index is presented record is moved to proper position in index. (introduces OrderCurrentRecord method). Small drawback is than in case of inserting record new record is first inserted before current record and then moved to proper position.(but it takes only few memory operations in current implementation).
Bug #23465

git-svn-id: trunk@23592 -
2013-02-11 07:44:20 +00:00
florian
5a81601565 * type casting could force pointers into sub registers, so handle them when converting the pointer to an array
git-svn-id: trunk@23591 -
2013-02-10 20:50:12 +00:00
marco
64ad892b55 * freebsd linking slightly alternate. Link .a's like Linux to avoid conflicts;
some extra linklibs (libgnu, libz) added. The libgnu linking might be 
   more version dependent.

git-svn-id: trunk@23590 -
2013-02-10 20:21:08 +00:00
marco
882bfd448d * fix for FreeBSD9 compatibility break where sem_t is no longer an opague pointer but a record.
Since it will only waste some stack space, one can the FreeBSD9 structure on all versions.

git-svn-id: trunk@23589 -
2013-02-10 17:51:29 +00:00
pierre
bb1e7646cb * More changes to better obey ABI rules
git-svn-id: trunk@23588 -
2013-02-10 13:01:49 +00:00
florian
77bbb8b5bc * type casting could force class variables into sub registers, so handle them in subscript nodes as well
git-svn-id: trunk@23587 -
2013-02-10 10:06:36 +00:00
sergei
209bfaa774 + MIPS: Allocate a LOC_VOID location for empty records, avoids internal errors in other parts of compiler.
git-svn-id: trunk@23586 -
2013-02-08 17:53:04 +00:00
pierre
2a1a196234 Add unittargetdir creation as prerequisite to gppc386 compilation
git-svn-id: trunk@23585 -
2013-02-08 15:51:34 +00:00
pierre
2916235cfe Fix make_simple_ref for pic address with big offsets
git-svn-id: trunk@23584 -
2013-02-08 15:47:14 +00:00
Jonas Maebe
bab4aac42e * use same symtable check in sym_is_owned_by() as in is_owned_by() to
determine whether or not we should stop (local/parasymtable)

git-svn-id: trunk@23583 -
2013-02-06 21:39:43 +00:00
Jonas Maebe
a972de5a32 * renamed the first parameter of is_owned_by() from "childdef" into
"nesteddef", because it's about def's owned by other defs, not about
    parent/child relations like in OOP
  * stop checking whether a def is owned by another one when we reach a
    para/localsymtable, since a type declared locally in a record/object
    method is not nested inside the record/object type (fixes mantis
    #23819)

git-svn-id: trunk@23582 -
2013-02-06 21:39:39 +00:00
Jonas Maebe
2b78bb1674 - removed ppc-specific tcgpara.composite field, it's no longer used or
necessary

git-svn-id: trunk@23581 -
2013-02-06 15:37:50 +00:00
svenbarth
344571cb4e Added support for type helpers. In non Delphi modes they use "type helper" and in mode Delphi they use "record helper". They can also be used on constants.
symconst.pas:
  + extend "thelpertype" by "ht_type" which tells the code in "pdecobj.parse_extended_type" that a type helper declaration has been parsed
node.pas:
  + add a constant which identifies all constant node types
ptype.pas:
  + read_named_type: add a parameter "hadtypetoken" to tell the code whether a "type" token had been parsed before
  + read_named_type: if an identifier "helper" is parsed we need to check whether "hadtypetoken" is true and the modeswitch "m_class" is set, but the "m_delphi" one is not; in that case we have a "type helper" declaration
pgenutil.pas, generate_specialization:
  * adjust call to read_named_type
pdecl.pas, types_dec:
  * adjust call to read_named_type

pdecobj.pas:
  * parse_extended_type: extend for correct handling of primitive types (includes Delphi compatible handling as well) and reject types that are explicitly not allowed
  * method_dec: require "static" for class methods in type helpers
  * method_doc: allow constructors for type helpers as well
paramgr.pas, tparamanager:
  * set_common_funcretloc_info: handle type helper constructors like record constructors
  * handle_common_ret_in_param: the "self" value of a type helper constructor is also returned in a parameter
pexpr.pas:
  + add a function to postfixoperators which tries to find and apply a type helper for a given type
  * postfixoperators: try to apply type helpers for ordinal constants
  * postfixoperators: use the correct string type for string constants
  * postfixoperators: try to apply type helpers for enum constants
  * postfixoperators: try to apply type helpers for arrays
  * postfixoperators: try to apply type helpers for Variant
  * postfixoperators: try to apply type helpers for pointer types
  * postfixoperators: try to apply type helpers for other types
  * factor: check postfixoperators after _REALNUMBER, _CCHAR, _CWCHAR, _TRUE and _FALSE
  * factor: also check postfixoperators if a _POINT follows a _NIL

symdef.pas, tdefawaresymtablestack.addhelpers:
  * use "generate_objectpascal_helper_key" to generate the key
symtable.pas:
  + add function to generate the key value for the map of extended types using the extended def
  * adjust "search_last_objectpascal_helper" and "search_objectpascal_helper" to handle primitive types as well
  * use the new "generate_objectpascal_helper_key" function to generate the key

pparautl.pas:
  * insert_self_and_vmt_para: don't insert the $vmt symbol for record or type helpers (ToDo: check whether class helpers really need the symbol as well)
  * insert_self_and_vmt_para: pass "self" as var parameter for type helpers as well
psub.pas, generate_bodyentry_block: 
  * also allow type helpers for constructor methods
ncal.pas, tcallnode.gen_self_tree:
  * also use a temp variable for type helper constructors
ncgcal.pas, tcgcallnode.secondcallparan:
  * allow Pointers to be passed as address param if it is the Self value of a type helper extending a pointer type
  * correctly handle the location in case of type helper constructors

+ add tests

git-svn-id: trunk@23580 -
2013-02-06 09:49:35 +00:00
yury
aeb3c002b0 * More correct fix for overview query. Use LEFT JOIN to explicitly specify order of tables to help MySQL to generate correct exec plan.
* Speed-up history query by using TESTRESULTS as main table and TR_ID field for ordering.
* Test file or run id must be provided for history query. Print an error if not provided.
* Limit query results to 1000 records to prevent unnecessary server load.

git-svn-id: trunk@23579 -
2013-02-05 23:56:38 +00:00
Jonas Maebe
f1ff92529b * group all -CT parameters together
git-svn-id: trunk@23578 -
2013-02-05 23:09:55 +00:00
Jonas Maebe
39e31337f1 * documented -CTthumbinterworking parameter
git-svn-id: trunk@23577 -
2013-02-05 23:09:48 +00:00
Jonas Maebe
227bb7d850 * made behaviour of -CT parameters consistent with other parameters: instead
of -CTnoTargetSwitch, now you can (and have to) use -CTTargetSwitch- to
    disable it

git-svn-id: trunk@23576 -
2013-02-05 23:09:41 +00:00
sergei
d82387ff72 * MIPS: fixed parameter management to properly align records smaller than 32 bits on big-endian targets.
* Also changed parameter management to allocate a single LOC_REFERENCE location for any parameter (or part of a parameter) passed on stack. Such locations can now be handled by generic code. As a consequence, TGMIPS.a_load_const_cgpara and a_load_ref_cgpara methods are no longer necessary (moreover they were ignoring parameter shifting).
* a_loadfpu_ref_cgpara patched to handle 64-bit location, which are now possible.

* This change eliminates code generation madness where each word of a record was copied individually, thus passing by value a 32K-word sized record was bloating into 64K instructions, multiply this number by 2 for larger records due to limited immediate offsets, and by another 2 for global record in PIC mode :/

git-svn-id: trunk@23575 -
2013-02-05 22:21:09 +00:00
svenbarth
c6c67dc182 Set the UnicodeCompare functions in the WideString manager also for WinCE and implement the Wide- and UnicodeCompare functions similar to Win32/64 by calling a common DoCompareString function.
git-svn-id: trunk@23574 -
2013-02-05 16:33:42 +00:00
pierre
a4e0a4c0f5 Adapt length of tprocinfoopt record string field to longest string
git-svn-id: trunk@23573 -
2013-02-04 23:01:36 +00:00
florian
3ca7a5ff8e - remove switch -Wx for arm thumb interworking, one should use -CTHUMBTINTERWORKING=ON instead
git-svn-id: trunk@23572 -
2013-02-04 21:46:27 +00:00
florian
cbf7eaaffc * copyright year updated
git-svn-id: trunk@23571 -
2013-02-04 21:33:23 +00:00
reiniero
33bf805ac1 * sqldb: bufdataset: no longer swallow filter parsing exceptions
git-svn-id: trunk@23570 -
2013-02-04 12:18:09 +00:00
florian
4d3df8f518 * stupid typo in TVMTWriter.RedirectToEmpty fixed, resolves #23763
git-svn-id: trunk@23569 -
2013-02-03 22:02:02 +00:00
sergei
70c0d680a6 + MIPS linker: understand R_MIPS_JALR relocation and __gnu_local_gp symbol.
git-svn-id: trunk@23568 -
2013-02-03 21:54:37 +00:00
sergei
ef38193043 * MIPS: Once again fixed g_external_wrapper. My initial assumption about .cpload was wrong: it is optimized into position-dependent sequence only if "-KPIC -mno-shared" is passed to GAS command line, without -KPIC it is ignored altogether. Therefore r23566 breaks some non-PIC tests.
git-svn-id: trunk@23567 -
2013-02-03 21:53:30 +00:00
sergei
9bc758d62b * Forgot to set base register to NR_GP
git-svn-id: trunk@23566 -
2013-02-03 01:46:49 +00:00
sergei
a0c1e1b07f * MIPS: fixed a_call_name and a_call_reg methods to workaround a bug in GAS <2.21, see comments in source for details.
+ g_external_wrapper method.

git-svn-id: trunk@23565 -
2013-02-02 23:52:58 +00:00
yury
49f9288611 * Due to buggy MySQL query plan optimizer, the existing tests overview query use incorrect execution plan which leads to long execution time. The SQL query has been changed to produce efficient execution plan. Now the overview form works correctly.
* Fixed displaying of the test category column.
* Fixed History overview.
* History form: display a error when a test file not found.
* Use MySQL 5.5 connection.

git-svn-id: trunk@23564 -
2013-02-02 16:07:45 +00:00
Jonas Maebe
a51e64bd4d + {$targetswitch xxx} directive that enables changing target switches
(-CTxxx) in the source code

git-svn-id: trunk@23563 -
2013-02-02 15:22:18 +00:00
Jonas Maebe
4022c29500 * mark each target switch with whether it's global or not, so a compiler
directive can be added that enables changing the local ones

git-svn-id: trunk@23562 -
2013-02-02 15:22:13 +00:00
Jonas Maebe
185f71762f * fixed automatic setter generation if only a setter and no getter prefix
has been specified

git-svn-id: trunk@23561 -
2013-02-02 15:21:58 +00:00
pierre
899951577a Avoid wrong code generation for a_call_name if we create pic code
git-svn-id: trunk@23560 -
2013-02-01 21:16:58 +00:00
pierre
f74954dd32 Correct code for shared library start
git-svn-id: trunk@23559 -
2013-02-01 21:14:44 +00:00
pierre
6e5be15087 Add PT convinience variable to ba able to debug InitFinalTable
git-svn-id: trunk@23558 -
2013-02-01 21:13:55 +00:00
sergei
8bfbee747a * MIPS: Rewrote g_intf_wrapper method to support instance offsets greater than 32767 and PIC (the latter part untested yet).
git-svn-id: trunk@23557 -
2013-02-01 18:28:46 +00:00
sergei
a519741d89 - Revert {$J-} accidentally committed in r23555.
git-svn-id: trunk@23556 -
2013-02-01 16:49:46 +00:00
sergei
503b132096 * cgbase.pas: added more MIPS-specific address types, needed to support large GOT model.
* cpugas.pas: GetReferenceString: rewritten, it is easier than trying to fix it. Fixes incorrect writing of non-PIC references containing base, symbol and offset together, and some forms of PIC references. Also supports newly introduced address types.

git-svn-id: trunk@23555 -
2013-02-01 16:46:22 +00:00
sergei
6e4f6a64d6 + MIPS: Allow subset locations for boolean NOT, this appears sufficient to fix all bitpacking-related tests.
git-svn-id: trunk@23554 -
2013-01-31 21:52:29 +00:00
sergei
ea36d4996a + MIPS: In PIC mode, set $t9 to correct value before exiting SignalToRunError, without it any subsequent access to global variable will repeatedly crash.
+ Added alias name to SignalToRunError, to be consistent with other targets.

git-svn-id: trunk@23553 -
2013-01-31 21:44:06 +00:00
marco
81eb59e081 * make ioctl related constants unsigned.
git-svn-id: trunk@23552 -
2013-01-31 18:48:32 +00:00