Commit Graph

7 Commits

Author SHA1 Message Date
Jonas Maebe
730f75ed96 * use current_module.realmodulename^ (= unit name as declared in its main
source) instead of the filename of a unit's source as its Java class name

git-svn-id: branches/jvmbackend@18352 -
2011-08-20 07:50:29 +00:00
Jonas Maebe
002455ab5c + support for instance and class fields, and unit-level global variables
o hlcgobj support in tcgsubscriptnode.pass_2 for JVM-required functionality
   o slightly different handling for class fields for the JVM than for other
     platforms: instead of adding a unit-level staticvarsym with a hidden name,
     rename the original (unused) field and add the staticvarsym with the original
     name to the object symtable. This is required because the JVM code generator
     has to know the class the field belongs to, as well as its real name
   o moved tprocdef.makejvmmangledcallname() functionality mostly to
     jvmdef.jvmaddtypeownerprefix() because it's also required for mangling
     field symbol names
  * changed the interface of jvmdef from ansistring to shortstring because
    all of its results are also used in shortstring contexts (and they're
    unlikely to overflow the shortstring limit)
  * "protected", "private" (without strict) and implementation-only symbols
    now get "package" visibility instead of "public" visibility

git-svn-id: branches/jvmbackend@18349 -
2011-08-20 07:49:46 +00:00
Jonas Maebe
28740dce2d - removed extra "fordefinition" parameter again from tprocdef.mangledname(),
since the definition-specific adorning of JVM mangled names is Jasmin-
    specific, and such code has no place in symdef
  * moved code to adorn JVM mangled names for Jasmin definitions to agjasmin

git-svn-id: branches/jvmbackend@18346 -
2011-08-20 07:49:31 +00:00
Jonas Maebe
83dc297346 + Java interface support, mostly the same as Objective-C protocols
(generalised some error messages that were specific to protocols
     so they can also be used for Java interfaces)
  o note, Java interface support requires a fix to Jasmin 2.4:
    http://sourceforge.net/tracker/?func=detail&aid=2897170&group_id=100746&atid=628212

git-svn-id: branches/jvmbackend@18344 -
2011-08-20 07:49:19 +00:00
Jonas Maebe
b0d050a490 * pass all .j files related to one unit in one go to Jasmin instead of
invoking Jasmin once for every generated .j file

git-svn-id: branches/jvmbackend@18343 -
2011-08-20 07:49:07 +00:00
Jonas Maebe
74d684878d * factored searching the exe directories from FindExe() into
FindFileInExeLocations()
  * search for jasmin.jar using FindFileInExeLocations and properly
    build the java command line, so jasmin can be called successfully
    by the compiler
  * properly create separate assembler files for each class, and
    correctly specify the class name and superclass for each class
    (units themselves are still hardcoded to descend from java.lang.Object)

git-svn-id: branches/jvmbackend@18318 -
2011-08-20 07:38:21 +00:00
Jonas Maebe
1e2c70796e + jvm (cpu architecure) and java ("OS"/target) identifiers
+ basic target information for jvm target (assembling/linking
    helpers are still dummies for now)
  + basic jasmin assembler writer
  + cpunode and cputarg units to include the target units in the
    compiler

git-svn-id: branches/jvmbackend@18309 -
2011-08-20 07:37:33 +00:00