Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
This commit is contained in:
Mark Wielaard
2006-03-10 21:46:48 +00:00
parent 27079765d0
commit 8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions
+25 -16
View File
@@ -90,7 +90,7 @@ public final class Selector
if (len > 0)
tests.toArray(this.tests);
else
this.tests[0] = new NameTest(null, true, true);
this.tests[0] = new NodeTypeTest((short) 0);
if (axis == NAMESPACE && this.tests[0] instanceof NameTest)
{
NameTest nt = (NameTest) this.tests[0];
@@ -107,6 +107,14 @@ public final class Selector
}
public boolean matches(Node context)
{
// If called directly, selector is the top level of the path
return matches(context,
getContextPosition(context),
getContextSize(context));
}
boolean matches(Node context, int pos, int len)
{
short nodeType = context.getNodeType();
switch (axis)
@@ -125,19 +133,11 @@ public final class Selector
default:
return false;
}
int tlen = tests.length;
if (tlen > 0)
for (int j = 0; j < tests.length && len > 0; j++)
{
int pos = getContextPosition(context);
int len = getContextSize(context);
if (len == 0)
System.err.println("WARNING: context size is 0");
for (int j = 0; j < tlen && len > 0; j++)
{
Test test = tests[j];
if (!test.matches(context, pos, len))
return false;
}
Test test = tests[j];
if (!test.matches(context, pos, len))
return false;
}
return true;
}
@@ -147,7 +147,10 @@ public final class Selector
int pos = 1;
for (ctx = ctx.getPreviousSibling(); ctx != null;
ctx = ctx.getPreviousSibling())
pos++;
{
if (tests[0].matches(ctx, 1, 1))
pos++;
}
return pos;
}
@@ -161,10 +164,16 @@ public final class Selector
int count = 1;
Node sib = ctx.getPreviousSibling();
for (; sib != null; sib = sib.getPreviousSibling())
count++;
{
if (tests[0].matches(ctx, 1, 1))
count++;
}
sib = ctx.getNextSibling();
for (; sib != null; sib = sib.getNextSibling())
count++;
{
if (tests[0].matches(ctx, 1, 1))
count++;
}
return count;
}