diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-12-04 14:48:54 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-12-04 14:48:54 +0000 |
commit | acab4cab492ad9b939c1dcf29f7ccfdd7e6060e4 (patch) | |
tree | b9c96e0c217b7af9c87934b3cfc69d00d5822956 /compiler/ncgld.pas | |
parent | 422f5088471586b758d682eed62cd7d624036b62 (diff) | |
download | fpc-acab4cab492ad9b939c1dcf29f7ccfdd7e6060e4.tar.gz |
* generate JVM bytecode that passes the stringent requirements of the Dalvik
verifier when -Cpjvmdalvik is used (including debug information). Using
-Cpjvmdalvik changes the semantics at the language-level in one case:
boolean(bytevar) will no longer return a boolean that contains the same
value as bytevar did, but will map the value to 0/1 (that also means that
such expressions cannot be passed to var-parameters in case of
-Cpjvmdalvik). Code compiled with -Cpjvmdalvik will also work fine on
the regular JVM, but it may be somewhat slower (it won't necessarily
be slower on Dalvik, because the .class -> .dex transformation
applies many optimizations itself)
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/jvmbackend@19743 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncgld.pas')
-rw-r--r-- | compiler/ncgld.pas | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/ncgld.pas b/compiler/ncgld.pas index 96fc8723ff..defb45f65f 100644 --- a/compiler/ncgld.pas +++ b/compiler/ncgld.pas @@ -29,6 +29,7 @@ interface uses globtype, symtype, + aasmdata, node,nld,cgutils; type @@ -42,6 +43,9 @@ interface end; tcgassignmentnode = class(tassignmentnode) + protected + function maybechangetemp(list: TAsmList; var n: tnode; const newref: treference): boolean;virtual; + public procedure pass_generate_code;override; end; @@ -67,7 +71,7 @@ implementation nutils, symtable,symconst,symdef,symsym,defutil,paramgr, ncnv,ncon,nmem,nbas,ncgrtti, - aasmbase,aasmtai,aasmdata,aasmcpu, + aasmbase,aasmtai,aasmcpu, cgbase,pass_2, procinfo, cpubase,parabase, @@ -158,7 +162,7 @@ implementation end; - function maybechangetemp(list: TAsmList; var n: tnode; const newref: treference): boolean; + function tcgassignmentnode.maybechangetemp(list: TAsmList; var n: tnode; const newref: treference): boolean; var rr: treplacerefrec; begin |