include Makefile.upstream
# figure out what stuff in org.xwt.plat.* this platform requires (its superclasses)
-all_java_sources := $(filter-out build/java/org/xwt/mips/%, $(patsubst src/%.java, build/java/%.java, $(shell find src -name '*.java')))
-all_java_sources += build/java/org/xwt/translators/FreetypeVM.java
+java_sources := $(patsubst src/%.java, build/java/%.java, $(shell find src -name '*.java' \! -path 'src/org/xwt/mips/*'))
+java_sources += build/java/org/xwt/translators/FreetypeVM.java
+all_java_sources := $(java_sources)
-java_sources := $(all_java_sources)
-nonplat_java_sources := $(filter-out build/java/org/xwt/plat/%, $(all_java_sources))
-plat_java_sources := $(filter build/java/org/xwt/plat/%, $(all_java_sources))
+nonplat_java_sources := $(filter-out build/java/org/xwt/plat/%, $(java_sources))
+plat_java_sources := $(filter build/java/org/xwt/plat/%, $(java_sources))
build/java/org/xwt/translators/FreetypeVM.java: build/res/freetype.mips build/class/org/xwt/mips/Compiler.class
mkdir -p build/java/org/xwt/translators
mkdir -p build/class/org/xwt/util/
./.jikes $<
-build/class/org/xwt/mips/Compiler.class: src/org/xwt/mips/*.* .jikes
+build/class/org/xwt/mips/Compiler.class: src/org/xwt/mips/*.java
+ make .jikes
@echo -e "\n\033[1mcompiling .java -> .class: $<\033[0m"
mkdir -p build/class/org/xwt/mips/
./.jikes $<
-
# this forces a clean build every time because jikes is so damn buggy
-preprocess: $(all_java_sources)
+preprocess: $(java_sources)
compile: .compile
-.compile: $(all_java_sources) .jikes
+.compile: $(java_sources) .jikes
@echo -e "\n\033[1mcompiling .java -> .class: src/**/*.java\033[0m"
- rm -rf build/class
+ @rm -f $(java_sources:build/java/%.java=build/class/%.class)
mkdir -p build/class
- @./.jikes $(all_java_sources)
+ @./.jikes $(java_sources)
touch .compile
# PHASE 4: gcj-generated headers
test: JVM; /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Commands/java -jar build/JVM/xwt.jar http://localhost/demo.xwar
#test: JVM; java -jar build/JVM/xwt.jar http://localhost/demo.xwar
-oldcompile: preprocess; CLASSPATH=$$CLASSPATH:lib/libgcj-minimal.jar javac -d build/class `find build/java/ -name \*.java`
+oldcompile: preprocess; CLASSPATH=$$CLASSPATH:lib/libgcj-minimal.jar javac -d build/class `find build/java/ src/org/xwt/mips -name \*.java`
.jikes:
@echo -e "\n\033[1mdetecting your jikes installation...\033[0m"
echo "#!/bin/sh" > .jikes
- echo 'for A in `find build/class -name \*.class`; do mv $$A $$A.old; done;' >> .jikes
+ #echo 'for A in `find build/class -name \*.class`; do mv $$A $$A.old; done;' >> .jikes
echo -n 'PATH=upstream/install/bin:$$PATH jikes -classpath lib/libgcj-minimal.jar $$@ -d build/class/ -sourcepath build/java/ ' >> .jikes
(type jikes && (jikes --version | grep "Version 1.18")) || make .install_jikes-1.18_ target=
echo -n "$(jikes_flags) -bootclasspath " >> .jikes
java -cp . GetBootClassPath >> .jikes
rm GetBootClassPath.*
echo 'EXIT=$$?' >> .jikes
- echo 'for A in `find build/class -name \*.class`; do test -e $$A.old && cmp -s $$A $$A.old && mv $$A.old $$A; done' >> .jikes
- echo 'for A in `find build/class -name \*.class`; do test -e $$A.old && rm $$A.old; done' >> .jikes
+ #echo 'for A in `find build/class -name \*.class`; do test -e $$A.old && cmp -s $$A $$A.old && mv $$A.old $$A; done' >> .jikes
+ #echo 'for A in `find build/class -name \*.class`; do test -e $$A.old && rm $$A.old; done' >> .jikes
echo 'exit $$EXIT' >> .jikes
mv .jikes .jikes+
cp .jikes+ .jikes
public int localToGlobalX(int x) { return parent == null ? x : parent.globalToLocalX(x + this.x); }
public int localToGlobalY(int y) { return parent == null ? y : parent.globalToLocalY(y + this.y); }
- public Object call(Object method, JSArray args) throws JS.Exn {
- if (!"indexof".equals(method)) return null;
- Box b = (Box)args.elementAt(0);
- if (b.parent != this) return (redirect == null || redirect == this) ? N(-1) : redirect.call(method, args);
+ public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) throws JS.Exn {
+ if (nargs != 1 || !"indexof".equals(method)) return super.callMethod(method, a0, a1, a2, rest, nargs);
+ Box b = (Box)a0;
+ if (b.parent != this)
+ return (redirect == null || redirect == this) ?
+ N(-1) :
+ redirect.callMethod(method, a0, a1, a2, rest, nargs);
return N(b.getIndexInParent());
}
+ public Enumeration keys() { throw new Error("you cannot apply for..in to a " + this.getClass().getName()); }
+
/** to be filled in by the Tree implementation */
abstract void put(int i, Object value);
public int numchildren = 0;
return redirect == null ? null : redirect == this ? getChild(toInt(name)) : redirect.get(name);
//#switch(name)
+ case "indexof": return METHOD;
case "text": return text;
case "path": throw new JS.Exn("cannot read from the path property");
case "fill": return colorToString(fillcolor);
String pac = null;
try {
org.xwt.js.JSArray args = new org.xwt.js.JSArray();
- args.addElement(url.toString());
- args.addElement(url.getHost());
- Object obj = pacFunc.call(null, args);
+ Object obj = pacFunc.call(url.toString(), url.getHost(), null, null, 2);
if (Log.verbose) Log.log(this, " PAC script returned \"" + obj + "\"");
pac = obj.toString();
} catch (Throwable e) {
}
JSFunction scr = JS.parse("PAC script at " + url, 0, new StringReader(script));
- scr.cloneWithNewParentJSScope(proxyAutoConfigRootJSScope).call(null, new JSArray());
+ scr.cloneWithNewParentJSScope(proxyAutoConfigRootJSScope).call(null, null, null, null, 0);
return (JSCallable)proxyAutoConfigRootJSScope.get("FindProxyForURL");
} catch (Exception e) {
if (Log.on) {
else return super.get(name);
}
- private static final JSObj proxyConfigBindings = new JSObj();
- private static final JSObj ProxyConfig = new JSObj() {
+ private static final JS proxyConfigBindings = new JS();
+ private static final JS ProxyConfig = new JS() {
public Object get(Object name) {
if (name.equals("bindings")) return proxyConfigBindings;
return null;