Commit Graph

59 Commits

Author SHA1 Message Date
Jonas Maebe
5496436349 * the generic astrings.inc is now also used to the extent possible on
the JVM target, and pos/insert/delete/val/str/uniquestring/setstring/
    stringofchar/... are now also available for ansistrings on the JVM
    target

git-svn-id: branches/jvmbackend@18906 -
2011-08-29 22:59:03 +00:00
Jonas Maebe
3a423b331c * full implementation of all routines in rtl/inc/ustringh.inc (except for
val/str for enums for now) for the JVM target: insert/delete/pos/...
  * use generic unicodestring helper routines where possible for the JVM
    target (not that many as for shortstrings since unicodestring is
    handled using java.lang.String)
  + complete widestring manager implementation for the JVM target. It uses
    a class with virtual methods rather than a record with function pointers
    for speed reasons though (since no existing widestring manager will be
    compatible anyway, that shouldn't cause any problems)

git-svn-id: branches/jvmbackend@18882 -
2011-08-28 19:22:22 +00:00
Jonas Maebe
1e329866b4 + tval5, also already works
git-svn-id: branches/jvmbackend@18880 -
2011-08-28 19:22:10 +00:00
Jonas Maebe
1f96763b9d * renamed Java-specific sstrings.inc/sstringh.inc to jsstrings.inc/
jsstringh.inc -> use generic inc/sstrings.inc
  * added a bunch of extra {$ifdef FPC_HAS_XXX} protections around
    routines in inc/sstrings.inc and implemented those routines for
    the JVM target in java/jsstrings.inc
  * use the majority of the generic routine in sstrings.inc now also
    for the JVM target! Only a few changes were needed:
   o in a few places, calls to move() for copying shortstring->shortstring
     or shortstring->chararray were replaced with calls to a new inline
     helper that calls move() in the version in inc/sstrings.inc, and
     JLSystem.arraycopt() in in the version in java/jsstrings.inc
   o changed the currency argument to str() for the JVM target to constref
     so its address can be taken (has to be typecasted to int64 without
     changing the value), and similarly changed the temporary result
     inside that routine to an array of 1 elements so the address can be
     taken
   o don't typecast the real value to a record type in str_real for the
     JVM target, but work via an int64 instead to extract sign/mantissa/exp
   o everything else compiled and worked as is!!
  -> val, str, hexstr/octstr/binstr, delete, pos, insert, setstring and
     comparetext now all work for shortstrings on the JVM target

git-svn-id: branches/jvmbackend@18836 -
2011-08-24 22:11:43 +00:00
Jonas Maebe
a2a0436347 + support for threadvars in the JVM based on JLThreadLocal; see
rtl/java/jtvarh.inc for the details

git-svn-id: branches/jvmbackend@18820 -
2011-08-23 17:45:01 +00:00
Jonas Maebe
c07c633b6a * also test passing enums to formal parameter types
git-svn-id: branches/jvmbackend@18812 -
2011-08-23 15:25:56 +00:00
Jonas Maebe
a3d4d05454 * support specifying different compiler binary on the command line
git-svn-id: branches/jvmbackend@18783 -
2011-08-20 08:36:04 +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
Jonas Maebe
740e7ca6b5 + a bunch of jvm-specific tests: partly new, partly derived from existing
tests
   o currently not yet integrated in the makefile system, use testall.sh/
     testall.bat to run the tests

git-svn-id: branches/jvmbackend@18777 -
2011-08-20 08:35:11 +00:00