Commit Graph

33831 Commits

Author SHA1 Message Date
pierre
f49fb7329a * Avoid crash if right node of _IN keyword is a type node that is not a set
git-svn-id: trunk@17159 -
2011-03-21 07:57:37 +00:00
florian
1f4be60927 * fix token order, I should really learn the alphabet
git-svn-id: branches/usersections@17155 -
2011-03-20 17:43:36 +00:00
florian
f328b6d635 + user section type
+ parsing of section directive for variables
  + section test
  + write section names in the assembler/binary writers correctly
  * allow section only after ; and for embedded targets

git-svn-id: branches/usersections@17154 -
2011-03-20 15:42:28 +00:00
florian
e4656050a7 + get/putansistring
git-svn-id: branches/usersections@17153 -
2011-03-20 15:39:33 +00:00
florian
f0d5c63728 * create branch for user defined sections for variables
git-svn-id: branches/usersections@17152 -
2011-03-20 15:37:34 +00:00
svenbarth
f7f357f18e * symconst.pas:
- remove thelpersearch again => adjustments to searchsym_in_class and calls to it
- rename sto_has_classhelper to sto_has_helper
* symbase.pas: make push and pop in tsymtablestack virtual
* symdef.pas:
- add a new class tdefawaresymtablestack which overrides push and pop of tsymtablestack and adjusts the new extendeddefs field of the current tmodule
- tobjectdef.create: sto_has_classhelper => sto_has_helper
* fmodule.pas:
- add new hash object list to tmodule (key: mangled type name) which holds object list instances that contain all helpers currently active for a given type (= key of the hash list)
- tmodule.create: the hash list owns the sublists (but those don't own the defs)
- tmodule.destroy: free the hash list
* pdecobjpas:
- rename parse_extended_class to parse_extended_type
- parsing of constructors:
# for all helper types: no class constructors allowed
# for record helpers: as long as constructors for records themselves are disabled they are for record helpers as well
- object_dec: manually add the helper to the extendeddefs if the overall owner of the current def is a static symtable (implementation section or program/library main file), because the symtable won't be popped and pushed then
* parser.pas: instantiate the new stack class
* psub.pas: backup the extendeddefs in specialize_objectdefs as well
* ptype.pas:
- generate_specialization: backup the extendeddefs as well
- record_dec: _RECORD is now consumed in read_named_type itself
- read_named_type: parse "record helper" if advanced record syntax is enabled
* symtable.pas:
- correct searchsym_in_class declaration => adjustments in this unit as well
- add the possibility to pass a context def to search_last_objectpascal_helper
- rename search_objectpascal_class_helper to search_objectpascal_helper
- rename search_class_helper to search_objc_helper
- searchsym_in_class: 
# search for helpers in every level of the tree of the class
# the contextclassh can also be a subclass of the extendeddef
- searchsym_in_record: search for helper methods as well
- searchsym_in_helper:
# search for symbols in class and record helpers is the same except for the search in the class' ancestors
# search the extendeddef directly and rely on searchsym_in_class only for the class' ancestors as we need to find the helpers there as well
- search_last_objectpascal_helper: use the extendeddefs list of current_module instead of scanning the symbol stack itself
* pexpr.pas: adjustments because of renaming of sto_has_classhelper
* pinline.pas: adjustment because of removing of thelpersearch
* nflw.pas: 
- renamed classhelper to helperdef
- adjusted search_last_objectpascal_helper call
* msg*:
- adjusted error message for constructors in records (this currently applies to record helpers as well)
- renamed parser_e_not_allowed_in_classhelper to parser_e_not_allowed_in_helper => adjustments in code
- added parser_e_no_class_constructors_in_helpers
* pdecsub.pas: adjusted renamed error message
* htypechk.pas: check for helpers in every step of the hierarchy
* nobj.pas: search_class_helper => search_objc_helper
* utils/ppudump.pas: adjust, because of renames

Note: the define "useoldsearch" will be only used for performance comparison on my (faster) Linux machine; that (and its associated code) will be removed afterwards

git-svn-id: branches/svenbarth/classhelpers@17151 -
2011-03-20 11:27:27 +00:00
svenbarth
96116a6c3a Several adjustments because virtual methods in helpers are just normal methods and a VMT isn't generated for them either.
* $CPU/cgcpu.pas: disable the generation of VMT loading code
* dbgstabs.pas, dbgdwarf.pas: treat virtual methods of helpers as normal methods
* ncgcal.pas: don't register virtual helper methods for WPO 
* ncgrtti.pas: write virtual helper methods as normal methods to RTTI
* nobj.pas: correctly handle final and override cases in helpers
* pdecvar.pas: property getters
* rautils.pas: no VMT offset in records

git-svn-id: branches/svenbarth/classhelpers@17150 -
2011-03-20 10:41:45 +00:00
florian
0bdd15e0da + added cwindirs for the time being to the compiler dir till a release with windirs in the rtl is released
git-svn-id: trunk@17149 -
2011-03-19 22:48:56 +00:00
joost
3c6bb40c52 * Samplecfg now uses fpcmkcfg to create the configuration files
git-svn-id: trunk@17148 -
2011-03-19 22:09:47 +00:00
marco
3a12f018f4 * Updated statfs to FreeBSD5+ level. Used a statfs union to provide some backwards compat.
git-svn-id: trunk@17147 -
2011-03-19 21:43:36 +00:00
Károly Balogh
2b94b3255c + compile some units in correct order of dependence
git-svn-id: trunk@17146 -
2011-03-19 14:43:58 +00:00
marco
0e6e2ba589 * Patch from LacaK2, implementing an initial BCDToStrF
git-svn-id: trunk@17145 -
2011-03-19 13:04:00 +00:00
Jonas Maebe
3d3a42b911 * improvement to r16050 for non-fixed stack targets: they never have to use
a temporary parameter location, since calls cannot overwrite parameters
    already on the stack in that case (it will just grow)

git-svn-id: trunk@17144 -
2011-03-18 18:32:02 +00:00
Károly Balogh
3d203220a5 + regenerated Makefile
git-svn-id: trunk@17143 -
2011-03-17 16:11:10 +00:00
Károly Balogh
8b7e98db4b + compile mouse before keyboard, as keyboard depends on it (MorphOS)
git-svn-id: trunk@17142 -
2011-03-17 08:10:30 +00:00
sergei
c2ea372682 * Declared types describing RTTI data of arrays and records, and rewrote main RTTI routines using these types. Shorter by about 60 lines, functionality isn't changed.
git-svn-id: trunk@17141 -
2011-03-16 18:53:53 +00:00
sergei
7fc2d86bb2 + InterlockedCompareExchange128, Linux implementation.
git-svn-id: trunk@17140 -
2011-03-16 06:28:47 +00:00
Jonas Maebe
d8627f24f4 + UIAlertView.inc
git-svn-id: trunk@17139 -
2011-03-15 17:43:13 +00:00
sergei
0849132ee1 + added procedure SetString(AnsiString, PWideChar, SizeInt)
git-svn-id: trunk@17138 -
2011-03-15 14:09:05 +00:00
sergei
7f62d5cfb0 * tcg.g_array_rtti_helper: if high-value is a constant, handle it without using a register.
* Now g_initialize, g_finalize, g_incrrefcount and g_decrrefcount should never more be used for open arrays, trigger internal error if it happens.

git-svn-id: trunk@17137 -
2011-03-15 09:30:55 +00:00
sergei
48d93dc40e * Fixed handling of "open array of managed type" out-parameters at caller side. Reference count should be decremented only for those array elements which are actually passed to the called procedure; it may be a part of original array if range or slice is used. Concludes work on #18859.
+ Test

git-svn-id: trunk@17136 -
2011-03-15 09:17:24 +00:00
joost
2df0ef4937 * Use GetWindowsSpecialDir from the new windirs unit
git-svn-id: trunk@17135 -
2011-03-14 20:51:00 +00:00
joost
2937190516 * Moved and renamed GetSpecialDir from sysutils to new windirs unit, so it can be used in the compiler
git-svn-id: trunk@17134 -
2011-03-14 20:43:03 +00:00
joost
a2511cecb0 * When debug is defined, use -gl, not -glh
* Added settings for darwin, copied from samplecfg

git-svn-id: trunk@17133 -
2011-03-13 20:48:22 +00:00
joost
e3eeca3efd * Updated comments in fpc.cfg partly based on comments in samplecfg's fpc.cfg
* Replaced $FPCTARGET->$fpctarget
 * Moved fppkg package search-path so that packages can override apache units
 * Renamed APACHE_1_13 define to APACHE_1_3

git-svn-id: trunk@17132 -
2011-03-13 20:12:22 +00:00
joost
4be289bb72 * Add the gcc-library path to the IDE-configuration, like samplecfg does
git-svn-id: trunk@17131 -
2011-03-13 16:44:45 +00:00
joost
404701afad * Removed -Oppentium3 from IDE settings, because that only works on i386
* Removed -Ratt from IDE settings (like is done in samplecfg)
 * Use $fpctarget macro in IDE settings

git-svn-id: trunk@17130 -
2011-03-13 16:26:14 +00:00
sergei
3e6ad5f5aa * tcgvecnode, simplified range checking for strings. Removed FPC_*STR_CHECKZERO helpers, and changed FPC_*STR_CHECKRANGE so they accept the original left node. Now strings are checked the same way as dynamic arrays, and the compiler part is considerably simpler.
git-svn-id: trunk@17129 -
2011-03-13 15:52:02 +00:00
Jonas Maebe
ac283bb237 * when checking whether the current class definition finalises an existing
forward-declared class, only search the current symtable rather than the
    entire symtable stack (to prevent finding types in e.g. nested types)

git-svn-id: trunk@17128 -
2011-03-13 13:34:49 +00:00
marco
c439d0107d * patch to allow append for TEventlog, from Ido. Mantis 18355
git-svn-id: trunk@17127 -
2011-03-13 01:17:34 +00:00
Jonas Maebe
8e788c6fa5 * further fixes for parsing declarations involving nested types that are
declared inside the the current structdef hierarchy: properly deal with
    multiple types of the same name nested into each other, by keeping track
    of at which point in the hierarchy we found the first type (and afterwards
    continuing from there, instead of from any point in the hierarchy where
    a type with this name can be found)

git-svn-id: trunk@17126 -
2011-03-12 23:54:12 +00:00
joost
4ac545752c * Solved problem with uninitialized variable
git-svn-id: trunk@17125 -
2011-03-12 22:13:08 +00:00
sergei
cf4c00e8d6 tcgvecnode, cleanup/refactoring:
* Separated two almost identical parts of code into procedure rangecheck_string;
- Removed range checking of regular_array[constant], which should, according to the comments, happen in typecheckpass. tvecnode.pass_typecheck indeed does the necessary tests, so removing this duplicate check also eliminates duplicate warning when range checking is off.

git-svn-id: trunk@17124 -
2011-03-12 21:40:10 +00:00
Jonas Maebe
7d5c4a0887 * regenerated with current fpcmake
git-svn-id: trunk@17122 -
2011-03-12 20:03:22 +00:00
Jonas Maebe
bc9ce007d0 * regenerated using current fpcmake
git-svn-id: trunk@17121 -
2011-03-12 20:00:47 +00:00
joost
9cb4f545bf * Add path of (user specific) packages installed with fppkg to fpc.cfg
git-svn-id: trunk@17116 -
2011-03-10 20:46:41 +00:00
joost
b1dd2f8659 * Fixed compilation on WinCE after r17114 and r17094
git-svn-id: trunk@17115 -
2011-03-10 19:03:00 +00:00
pierre
1f1172e73e * Fix win64 compilation failure
git-svn-id: trunk@17114 -
2011-03-10 13:59:19 +00:00
pierre
dd627980e3 + Group C and CPP sources into C_SOURCES and CPP_SOURCES variables
* Use these new varaibles to simplify copyfiles rule, copy the objects
  into output subdirectory and not in tests/test/cg.
  + New rules: create_c_objects and delete_c_objects.
  create_c_objects: Compile using TEST_CCOMPILER variable value
  all C_SOURCES and CPP_SOURCES, using TEST_CFLAGS option if set.
  delete_c_objects: Delete the existing C compiled objects to force
  recompilation in create_c_objects.

git-svn-id: trunk@17113 -
2011-03-10 11:45:19 +00:00
Jonas Maebe
af38604706 * fixed spelling of "isforward" parameter in previous patch
* fixed support for fully qualified classes that are multiple levels deep
    in another part of the hierarchy (+ adapted test)

git-svn-id: trunk@17112 -
2011-03-09 22:58:23 +00:00
Jonas Maebe
707f19e4c9 * factored out parsing of fully qualified nested types inside their
enclosing types, so that it works both for single_type() and
    read_named_type() (-> works inside class definitions)
  * modified tclass13 to test this

git-svn-id: trunk@17111 -
2011-03-09 21:13:24 +00:00
Jonas Maebe
ad5eea80e1 * corrected test name
git-svn-id: trunk@17110 -
2011-03-09 20:17:08 +00:00
florian
8d960cb608 + implementation of shifting operations for avr
* handle shl/shr operand size correctly

git-svn-id: branches/avr@17109 -
2011-03-09 19:48:01 +00:00
florian
f5694da7bc * OS_INT => OS_32
git-svn-id: branches/avr@17108 -
2011-03-09 19:47:10 +00:00
florian
d4ff3b2eb6 * forgotten file in previous commit
git-svn-id: branches/avr@17107 -
2011-03-09 19:46:42 +00:00
florian
c7e6d07ff0 * fix tavraddnode.second_cmp
* optimized register usage
+ implemented concatcopy for len<16

git-svn-id: branches/avr@17106 -
2011-03-09 19:46:05 +00:00
florian
8f343078fa * optimize moves into movw if possible
* use ldd instruction if possible

git-svn-id: branches/avr@17105 -
2011-03-09 19:42:15 +00:00
florian
5f06130095 * fixed objpas compilation for CPUs with 16 Bit addresses
git-svn-id: branches/avr@17104 -
2011-03-09 19:41:36 +00:00
florian
de2d504f15 + dedicated getaddressregister so address registers are allocated with size OS_ADDR
* allocate volatile register first
* start with R8 so allocation might be pair wise

git-svn-id: branches/avr@17103 -
2011-03-09 19:40:57 +00:00
florian
a6464c36e3 * push reads the register
* concatcopy for len>=16 implemented

git-svn-id: branches/avr@17102 -
2011-03-09 19:40:07 +00:00