[bajos] r931 committed - noch mehr macros

0 views
Skip to first unread message

ba...@googlecode.com

unread,
Oct 11, 2011, 3:00:10 AM10/11/11
to bajo...@googlegroups.com
Revision: 931
Author: burkhart.holznagel
Date: Mon Oct 10 23:49:34 2011
Log: noch mehr macros
http://code.google.com/p/bajos/source/detail?r=931

Modified:
/trunk/bajos/JVM/interpreter.c

=======================================
--- /trunk/bajos/JVM/interpreter.c Wed Sep 14 03:48:19 2011
+++ /trunk/bajos/JVM/interpreter.c Mon Oct 10 23:49:34 2011
@@ -215,12 +215,7 @@
CASE CALOAD: DEBUGPRINTLN("caload");
CASE SALOAD: DEBUGPRINTLN("saload");
}
-
-#ifdef AVR8 // change all avr8 string to flash
strings gives more data ram space for java!!
- printf_P(PSTR("%x, =>"),first.UInt);
-#else
- printf("%x, =>",first.UInt);
-#endif
+ PRINTF("%x, =>",first.UInt);
#endif
lengthArray = first.stackObj.arrayLength;
if (first.UInt == NULLOBJECT.UInt)
@@ -916,7 +911,6 @@
#ifdef AVR8
findClassFlash
#else
-
findClass
#endif
(
@@ -1054,33 +1048,14 @@
/*kann weg*/
if (!
#ifdef AVR8
- findClassFlash(
- getAddr(CP(cN,getU2(CP(cN,
getU2(CP(cN,BYTECODEREF)+1))+1))+3),
- getU2(CP(cN,getU2(CP(cN,
getU2(CP(cN,BYTECODEREF)+1))+1))+1))
+ findClassFlash
#else
- findClass(
- getAddr(
- CP(
- cN,
- getU2(
- CP(
- cN,
- getU2(
- CP(cN, BYTECODEREF)
- + 1)) + 1))
- + 3),
- getU2(
- CP(
- cN,
- getU2(
- CP(
- cN,
- getU2(
- CP(cN, BYTECODEREF)
- + 1)) + 1))
- + 1))
+ findClass
#endif
- )
+ (
+ getAddr(CP(cN,getU2(CP(cN,
getU2(CP(cN,BYTECODEREF)+1))+1))+3),
+ getU2(CP(cN,getU2(CP(cN,
getU2(CP(cN,BYTECODEREF)+1))+1))+1))
+ )
{
CLASSNOTFOUNDERR(
getAddr(
@@ -1141,11 +1116,7 @@
/* die Stelle auf dem heap*/

if (
- #ifdef AVR8
- strncmpRamFlash( "B",fieldDescr, 1)
- #else
- strncmp("B", fieldDescr, 1)
- #endif
+ STRNCMPRAMFLASH( "B",fieldDescr, 1)
== 0)
{
/* Truncate Integer input for Byte output */
@@ -1565,12 +1536,7 @@
{
u2 fielddescr =
cs[cN].constant_pool[getU2(cs[cN].field_info[i] + 4)];
u1 isNotObject =
- #ifdef AVR8
- strncmpRamFlash
- #else
- strncmp
- #endif
- ("L",(const char*) getAddr(fielddescr + 3), 1);
+ STRNCMPRAMFLASH("L",(const char*) getAddr(fielddescr + 3), 1);
if ( (getU2(cs[cN].field_info[i]) & ACC_FINAL) && isNotObject)
continue; // ignore static and non static primitive finals
if ( getU2(cs[cN].field_info[i]) & ACC_STATIC) continue;// ignore
static
fN++;
@@ -2011,10 +1977,11 @@
cs[cN].constant_pool[getU2(cs[cN].constant_pool[addr] + 1)];
methodStackPush(cN);
#ifdef AVR8
- findClassFlash(getAddr(super_class+3), getU2(super_class+1));
+ findClassFlash
#else
- findClass(getAddr(super_class + 3), getU2(super_class + 1));
+ findClass
#endif
+ (getAddr(super_class + 3), getU2(super_class + 1));
if (!checkInstance(target))
{
cN = methodStackPop();
@@ -2106,13 +2073,7 @@
#ifdef DEBUG
if (strlen(identifier) != length)
{
-
-#ifdef AVR8 // change all avr8 string to
flash strings gives more data ram space for java!!
- printf_P(PSTR("ERROR: Wrong length for %s\n"), identifier);
-#else
- printf("ERROR: Wrong length for %s\n", identifier);
-#endif
-
+ PRINTF("ERROR: Wrong length for %s\n", identifier);
}
#endif

Reply all
Reply to author
Forward
0 new messages