зеркало из https://github.com/mozilla/pluotsorbet.git
Merge.
This commit is contained in:
Коммит
d590b22c71
|
@ -7,6 +7,7 @@ certs/j2se_test.ks
|
|||
tests/Testlets.java
|
||||
output/
|
||||
build/
|
||||
config/build.js
|
||||
|
||||
# These are generated by the Java pre-processor. They're generated from
|
||||
# their *.jpp equivalents. Keep them up-to-date when you add *.jpp files!
|
||||
|
|
|
@ -12,6 +12,9 @@ before_script:
|
|||
- wget -P /tmp/j2me.js -N https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/31.0/runtimes/xulrunner-31.0.en-US.linux-x86_64.tar.bz2
|
||||
- tar x -C /tmp -f /tmp/j2me.js/xulrunner-31.0.en-US.linux-x86_64.tar.bz2
|
||||
- export SLIMERJSLAUNCHER=/tmp/xulrunner/xulrunner
|
||||
- wget -P /tmp/j2me.js -N http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/36.0b1-candidates/build1/jsshell-linux-x86_64.zip
|
||||
- unzip -d /tmp/js /tmp/j2me.js/jsshell-linux-x86_64.zip
|
||||
- export PATH=$PATH:/tmp/js
|
||||
script:
|
||||
- make test
|
||||
sudo: false
|
||||
|
|
18
Makefile
18
Makefile
|
@ -1,9 +1,10 @@
|
|||
.PHONY: all test tests j2me java certs app clean jasmin aot shumway
|
||||
.PHONY: all test tests j2me java certs app clean jasmin aot shumway config-build
|
||||
BASIC_SRCS=$(shell find . -maxdepth 2 -name "*.ts" -not -path "./build/*")
|
||||
JIT_SRCS=$(shell find jit -name "*.ts" -not -path "./build/*")
|
||||
SHUMWAY_SRCS=$(shell find shumway -name "*.ts")
|
||||
RELEASE ?= 0
|
||||
|
||||
all: java jasmin tests j2me shumway aot
|
||||
all: config-build java jasmin tests j2me shumway aot
|
||||
|
||||
test: all
|
||||
tests/runtests.py
|
||||
|
@ -26,14 +27,15 @@ build/jsc.js: jsc.ts build/j2me-jsc.js
|
|||
j2me: build/j2me.js build/jsc.js
|
||||
|
||||
aot: build/classes.jar.js
|
||||
build/classes.jar.js: java/classes.jar build/jsc.js
|
||||
|
||||
build/classes.jar.js: java/classes.jar build/jsc.js aot-methods.txt
|
||||
@echo "Compiling ..."
|
||||
js build/jsc.js -cp java/classes.jar -d -jf java/classes.jar -mff aot-methods.txt > build/classes.jar.js
|
||||
|
||||
build/tests.jar.js: tests/tests.jar build/jsc.js
|
||||
build/tests.jar.js: tests/tests.jar build/jsc.js aot-methods.txt
|
||||
js build/jsc.js -cp java/classes.jar tests/tests.jar -d -jf tests/tests.jar -mff aot-methods.txt > build/tests.jar.js
|
||||
|
||||
build/program.jar.js: program.jar build/jsc.js
|
||||
build/program.jar.js: program.jar build/jsc.js aot-methods.txt
|
||||
js build/jsc.js -cp java/classes.jar program.jar -d -jf program.jar -mff aot-methods.txt > build/program.jar.js
|
||||
|
||||
closure: build/classes.jar.js build/j2me.js
|
||||
|
@ -46,6 +48,9 @@ shumway: build/shumway.js
|
|||
build/shumway.js: $(SHUMWAY_SRCS)
|
||||
node tools/tsc.js --sourcemap --target ES5 shumway/references.ts --out build/shumway.js
|
||||
|
||||
config-build:
|
||||
echo "config.release = ${RELEASE};" > config/build.js
|
||||
|
||||
tests/tests.jar: tests
|
||||
tests:
|
||||
make -C tests
|
||||
|
@ -58,12 +63,13 @@ certs:
|
|||
make -C certs
|
||||
|
||||
# Makes an output/ directory containing the packaged open web app files.
|
||||
app: java certs
|
||||
app: config-build java certs
|
||||
tools/package.sh
|
||||
|
||||
clean:
|
||||
rm -f j2me.js `find . -name "*~"`
|
||||
rm -rf build
|
||||
rm -f config/build.js
|
||||
make -C tools/jasmin-2.4 clean
|
||||
make -C tests clean
|
||||
make -C java clean
|
||||
|
|
|
@ -26,7 +26,7 @@ index.html is a webapp that runs j2me.js. The URL parameters you pass to index.h
|
|||
|
||||
### URL parameters
|
||||
|
||||
See full list at libs/urlparams.js
|
||||
You can specify URL parameters to override the configuration. See the full list of parameters at config/urlparams.js.
|
||||
|
||||
* `main` - default is `com/sun/midp/main/MIDletSuiteLoader`
|
||||
* `midletClassName` - must be set to the main class to run. Only valid when default `main` parameter is used. Defaults to `RunTests`
|
||||
|
|
348
aot-methods.txt
348
aot-methods.txt
|
@ -1 +1,349 @@
|
|||
java/util/Vector.indexOf.(Ljava/lang/Object;I)I
|
||||
java/util/PropertyPermission.getActions.(I)Ljava/lang/String;
|
||||
java/util/Vector.addElement.(Ljava/lang/Object;)V
|
||||
java/util/Vector.size.()I
|
||||
java/util/Vector.elementAt.(I)Ljava/lang/Object;
|
||||
java/util/Vector.ensureCapacityHelper.(I)V
|
||||
javax/microedition/lcdui/Graphics.getClipX.()I
|
||||
javax/microedition/lcdui/Graphics.getClipY.()I
|
||||
javax/microedition/lcdui/Graphics.getClipWidth.()I
|
||||
javax/microedition/lcdui/Graphics.getClipHeight.()I
|
||||
java/io/DataInputStream.read.()I
|
||||
javax/microedition/lcdui/Graphics.setClip.(IIII)V
|
||||
java/lang/Math.max.(II)I
|
||||
javax/microedition/lcdui/Graphics.clipRect.(IIII)V
|
||||
com/sun/cldc/i18n/uclc/DefaultCaseConverter.isDigit.(C)Z
|
||||
com/nokia/mid/ui/DirectUtils.getDirectGraphics.(Ljavax/microedition/lcdui/Graphics;)Lcom/nokia/mid/ui/DirectGraphics;
|
||||
com/nokia/mid/ui/DirectGraphicsImp.<init>.(Ljavax/microedition/lcdui/Graphics;)V
|
||||
javax/microedition/lcdui/Font.getHeight.()I
|
||||
java/security/Permission.<init>.(Ljava/lang/String;)V
|
||||
java/security/BasicPermission.init.(Ljava/lang/String;)V
|
||||
java/security/AccessController.checkPermission.(Ljava/security/Permission;)V
|
||||
java/lang/Character.digit.(CI)I
|
||||
com/sun/cldc/i18n/uclc/DefaultCaseConverter.digit.(CI)I
|
||||
java/util/PropertyPermission.getMask.(Ljava/lang/String;)I
|
||||
java/lang/System.getProperty.(Ljava/lang/String;)Ljava/lang/String;
|
||||
java/util/PropertyPermission.<init>.(Ljava/lang/String;Ljava/lang/String;)V
|
||||
java/security/BasicPermission.<init>.(Ljava/lang/String;Ljava/lang/String;)V
|
||||
java/util/PropertyPermission.init.(I)V
|
||||
java/security/Permission.getName.()Ljava/lang/String;
|
||||
javax/microedition/lcdui/Graphics.setColor.(I)V
|
||||
javax/microedition/lcdui/Graphics.getFont.()Ljavax/microedition/lcdui/Font;
|
||||
javax/microedition/lcdui/Graphics.getColor.()I
|
||||
java/util/Vector.<init>.(II)V
|
||||
java/util/Vector.<init>.(I)V
|
||||
javax/microedition/lcdui/Graphics.setFont.(Ljavax/microedition/lcdui/Font;)V
|
||||
java/util/Vector.<init>.()V
|
||||
javax/microedition/lcdui/Graphics.grayVal.(III)I
|
||||
java/util/Vector.copyInto.([Ljava/lang/Object;)V
|
||||
com/sun/midp/events/Event.getType.()I
|
||||
java/lang/Integer.parseInt.(Ljava/lang/String;I)I
|
||||
java/lang/Integer.parseInt.(Ljava/lang/String;)I
|
||||
java/lang/Integer.<init>.(I)V
|
||||
java/io/DataInputStream.readInt.()I
|
||||
java/io/DataOutputStream.write.(I)V
|
||||
javax/microedition/lcdui/Canvas.repaint.(IIII)V
|
||||
java/util/Vector.removeAllElements.()V
|
||||
com/sun/midp/events/EventQueue.post.(Lcom/sun/midp/events/Event;)V
|
||||
javax/microedition/lcdui/Font.getDefaultFont.()Ljavax/microedition/lcdui/Font;
|
||||
javax/microedition/lcdui/Graphics.resetGC.()V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.lIsShown.()Z
|
||||
javax/microedition/lcdui/DisplayableLFImpl.lRequestPaint.(IIIILjava/lang/Object;)V
|
||||
javax/microedition/lcdui/Display.isShown.(Ljavax/microedition/lcdui/DisplayableLF;)Z
|
||||
com/sun/midp/lcdui/RepaintEvent.setRepaintFields.(Lcom/sun/midp/lcdui/DisplayEventConsumer;IIIILjava/lang/Object;)V
|
||||
javax/microedition/lcdui/Display.repaintImpl.(Ljavax/microedition/lcdui/DisplayableLF;IIIILjava/lang/Object;)V
|
||||
com/sun/midp/lcdui/RepaintEventProducer.scheduleRepaint.(Lcom/sun/midp/lcdui/DisplayEventConsumer;IIIILjava/lang/Object;)V
|
||||
javax/microedition/lcdui/Font.getBaselinePosition.()I
|
||||
javax/microedition/lcdui/CanvasLFImpl.lRepaint.(IIIILjava/lang/Object;)V
|
||||
java/util/Hashtable.put.(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
java/util/HashtableEntry.<init>.()V
|
||||
java/lang/Integer.hashCode.()I
|
||||
java/io/DataInputStream.readFully.([BII)V
|
||||
java/io/DataInputStream.read.([BII)I
|
||||
javax/microedition/lcdui/ImageData.getWidth.()I
|
||||
javax/microedition/lcdui/ImageData.getHeight.()I
|
||||
java/lang/String.valueOf.(Ljava/lang/Object;)Ljava/lang/String;
|
||||
com/nokia/mid/ui/CanvasItem.getParent.()Ljava/lang/Object;
|
||||
java/util/Vector.removeElementAt.(I)V
|
||||
java/lang/ref/WeakReference.<init>.(Ljava/lang/Object;)V
|
||||
java/lang/ref/Reference.<init>.(Ljava/lang/Object;)V
|
||||
javax/microedition/lcdui/ImageDataFactory.getImageDataFactory.()Ljavax/microedition/lcdui/AbstractImageDataFactory;
|
||||
javax/microedition/lcdui/Image.<init>.(Ljavax/microedition/lcdui/ImageData;)V
|
||||
javax/microedition/lcdui/ImageData.<init>.(IIZ)V
|
||||
com/sun/midp/events/Event.<init>.(I)V
|
||||
javax/microedition/lcdui/Displayable.getHeight.()I
|
||||
javax/microedition/lcdui/DisplayableLFImpl.lGetHeight.()I
|
||||
javax/microedition/lcdui/Displayable.getWidth.()I
|
||||
javax/microedition/lcdui/DisplayableLFImpl.lGetWidth.()I
|
||||
java/lang/Object.wait.()V
|
||||
java/lang/Boolean.booleanValue.()Z
|
||||
com/sun/midp/rms/RecordStoreUtil.getInt.([BI)I
|
||||
com/sun/midp/events/EventQueue.run.()V
|
||||
com/sun/midp/lcdui/LCDUIEvent.<init>.(I)V
|
||||
com/sun/midp/lcdui/LCDUIEventListener.preprocess.(Lcom/sun/midp/events/Event;Lcom/sun/midp/events/Event;)Z
|
||||
java/util/Stack.empty.()Z
|
||||
java/io/OutputStream.write.([B)V
|
||||
com/sun/midp/lcdui/LCDUIEvent.createBasicEvent.(Lcom/sun/midp/lcdui/DisplayEventConsumer;I)Lcom/sun/midp/lcdui/LCDUIEvent;
|
||||
com/sun/midp/lcdui/LCDUIEventListener.preprocessAllowOnlyOneEvent.(Lcom/sun/midp/events/Event;Lcom/sun/midp/events/Event;)Z
|
||||
javax/microedition/lcdui/Display.callSerially.(Ljava/lang/Runnable;)V
|
||||
com/sun/midp/lcdui/DisplayEventProducer.sendCallSeriallyEvent.(Lcom/sun/midp/lcdui/DisplayEventConsumer;)V
|
||||
javax/microedition/lcdui/Display.getCallSerially.()V
|
||||
java/util/Vector.elements.()Ljava/util/Enumeration;
|
||||
java/util/VectorEnumerator.<init>.(Ljava/util/Vector;)V
|
||||
java/util/VectorEnumerator.hasMoreElements.()Z
|
||||
com/sun/midp/lcdui/LCDUIEventListener.process.(Lcom/sun/midp/events/Event;)V
|
||||
javax/microedition/lcdui/Graphics.reset.(IIII)V
|
||||
javax/microedition/lcdui/Display.callPaint.(IIIILjava/lang/Object;)V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.uIsScrollNative.()Z
|
||||
javax/microedition/lcdui/CanvasLFImpl.uCallPaint.(Ljavax/microedition/lcdui/Graphics;Ljava/lang/Object;)V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.uCallPaint.(Ljavax/microedition/lcdui/Graphics;Ljava/lang/Object;)V
|
||||
com/sun/midp/lcdui/DisplayDevice.refresh.(IIIII)V
|
||||
javax/microedition/lcdui/Display$DisplayEventConsumerImpl.handleCallSeriallyEvent.()V
|
||||
javax/microedition/lcdui/Display.access$700.(Ljavax/microedition/lcdui/Display;)V
|
||||
com/sun/midp/lcdui/RepaintEventProducer.preprocess.(Lcom/sun/midp/events/Event;Lcom/sun/midp/events/Event;)Z
|
||||
com/sun/midp/lcdui/RepaintEventProducer.process.(Lcom/sun/midp/events/Event;)V
|
||||
javax/microedition/lcdui/Display$DisplayEventConsumerImpl.handleRepaintEvent.(IIIILjava/lang/Object;)V
|
||||
java/io/OutputStream.write.([BII)V
|
||||
com/sun/midp/events/NativeEventPool.get.()Lcom/sun/midp/events/NativeEvent;
|
||||
com/sun/midp/events/NativeEventPool.putBack.(Lcom/sun/midp/events/NativeEvent;)V
|
||||
com/sun/midp/events/NativeEvent.clear.()V
|
||||
com/sun/midp/lcdui/DisplayContainer.findDisplayById.(I)Lcom/sun/midp/lcdui/DisplayAccess;
|
||||
javax/microedition/lcdui/Display.access$200.(Ljavax/microedition/lcdui/Display;)Ljavax/microedition/lcdui/DisplayableLF;
|
||||
javax/microedition/lcdui/Display$DisplayAccessImpl.getDisplayId.()I
|
||||
com/sun/midp/lcdui/DisplayEventListener.preprocess.(Lcom/sun/midp/events/Event;Lcom/sun/midp/events/Event;)Z
|
||||
com/sun/midp/lcdui/DisplayEventListener.process.(Lcom/sun/midp/events/Event;)V
|
||||
com/sun/midp/lcdui/DisplayContainer.findDisplayEventConsumer.(I)Lcom/sun/midp/lcdui/DisplayEventConsumer;
|
||||
javax/microedition/lcdui/Display$DisplayAccessImpl.getDisplayEventConsumer.()Lcom/sun/midp/lcdui/DisplayEventConsumer;
|
||||
java/lang/Character.isDigit.(C)Z
|
||||
com/nokia/mid/ui/CanvasItem.setPosition.(II)V
|
||||
com/nokia/mid/ui/gestures/GestureEventImpl.getStartX.()I
|
||||
com/nokia/mid/ui/gestures/GestureEventImpl.getStartY.()I
|
||||
com/nokia/mid/ui/gestures/GestureEventImpl.getType.()I
|
||||
com/sun/midp/events/NativeEventMonitor.run.()V
|
||||
javax/microedition/lcdui/Image.getWidth.()I
|
||||
java/util/Hashtable.get.(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
javax/microedition/lcdui/Image.getHeight.()I
|
||||
java/lang/Object.equals.(Ljava/lang/Object;)Z
|
||||
java/io/PrintStream.ensureOpen.()V
|
||||
java/io/OutputStreamWriter.ensureOpen.()V
|
||||
com/sun/cldc/i18n/j2me/UTF_8_Writer.write.([CII)V
|
||||
javax/microedition/lcdui/Image.getRGB.([IIIIIII)V
|
||||
javax/microedition/lcdui/Graphics.setDimensions.(II)V
|
||||
javax/microedition/lcdui/Graphics.<init>.()V
|
||||
com/nokia/mid/ui/DirectUtils.createImage.(III)Ljavax/microedition/lcdui/Image;
|
||||
javax/microedition/lcdui/Image.createImage.(II)Ljavax/microedition/lcdui/Image;
|
||||
javax/microedition/lcdui/ImageDataFactory.createOffScreenImageData.(II)Ljavax/microedition/lcdui/ImageData;
|
||||
javax/microedition/lcdui/Image.getGraphics.()Ljavax/microedition/lcdui/Graphics;
|
||||
javax/microedition/lcdui/Image.isMutable.()Z
|
||||
javax/microedition/lcdui/ImageData.isMutable.()Z
|
||||
javax/microedition/lcdui/Graphics.getImageGraphics.(Ljavax/microedition/lcdui/Image;)Ljavax/microedition/lcdui/Graphics;
|
||||
java/lang/Math.abs.(I)I
|
||||
javax/microedition/lcdui/Graphics.translate.(II)V
|
||||
javax/microedition/lcdui/Image.createRGBImage.([IIIZ)Ljavax/microedition/lcdui/Image;
|
||||
javax/microedition/lcdui/ImageDataFactory.createImmutableImageData.([IIIZ)Ljavax/microedition/lcdui/ImageData;
|
||||
java/util/Vector.setElementAt.(Ljava/lang/Object;I)V
|
||||
com/sun/midp/rms/RecordStoreFile.read.([B)I
|
||||
com/sun/midp/rms/RecordStoreFile.read.([BII)I
|
||||
com/sun/midp/rms/RecordStoreFile.seek.(I)V
|
||||
com/nokia/mid/ui/TextEditor.isMultiline.()Z
|
||||
java/io/DataOutputStream.writeLong.(J)V
|
||||
java/lang/Integer.toString.(II)Ljava/lang/String;
|
||||
java/lang/Integer.toString.(I)Ljava/lang/String;
|
||||
javax/microedition/rms/RecordStore.isOpen.()Z
|
||||
javax/microedition/lcdui/Display$DisplayEventConsumerImpl.handlePointerEvent.(III)V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.uCallPointerEvent.(III)V
|
||||
com/nokia/mid/ui/gestures/GestureRegistrationManager.callListener.(Lcom/nokia/mid/ui/gestures/GestureEvent;)V
|
||||
com/nokia/mid/ui/gestures/GestureEventImpl.<init>.(IIIIIFIIIIIIIIII)V
|
||||
javax/microedition/lcdui/Display$DisplayEventConsumerImpl.handleGestureEvent.(Lcom/nokia/mid/ui/gestures/GestureEvent;)V
|
||||
com/nokia/mid/ui/gestures/GestureInteractiveZone.contains.(II)Z
|
||||
com/nokia/mid/ui/gestures/GestureInteractiveZone.supports.(I)Z
|
||||
java/lang/Long.<init>.(J)V
|
||||
com/sun/midp/rms/RecordStoreUtil.calculateBlockSize.(I)I
|
||||
javax/microedition/lcdui/CanvasLFImpl.uCallPointerDragged.(II)V
|
||||
com/sun/cldc/io/ResourceInputStream.read.([BII)I
|
||||
com/nokia/mid/ui/gestures/GestureEventImpl.getDragDistanceX.()I
|
||||
com/nokia/mid/ui/gestures/GestureEventImpl.getDragDistanceY.()I
|
||||
java/io/PrintStream.println.(Ljava/lang/String;)V
|
||||
java/io/PrintStream.print.(Ljava/lang/String;)V
|
||||
java/io/PrintStream.write.(Ljava/lang/String;)V
|
||||
java/io/Writer.write.(Ljava/lang/String;)V
|
||||
java/io/OutputStreamWriter.write.(Ljava/lang/String;II)V
|
||||
java/io/Writer.write.(Ljava/lang/String;II)V
|
||||
java/io/PrintStream.newLine.()V
|
||||
java/io/OutputStreamWriter.write.(I)V
|
||||
java/io/Writer.write.(I)V
|
||||
com/nokia/mid/ui/TextEditor.getFont.()Ljavax/microedition/lcdui/Font;
|
||||
com/nokia/mid/ui/TextEditor.getVisibleContentPosition.()I
|
||||
com/sun/midp/rms/RecordStoreSharedDBHeader.getHeaderData.()[B
|
||||
java/util/Vector.indexOf.(Ljava/lang/Object;)I
|
||||
java/lang/Long.longValue.()J
|
||||
java/lang/Long.hashCode.()I
|
||||
java/util/Hashtable.containsKey.(Ljava/lang/Object;)Z
|
||||
javax/microedition/rms/RecordStore.checkOpen.()V
|
||||
java/lang/Long.equals.(Ljava/lang/Object;)Z
|
||||
javax/microedition/rms/RecordEnumerationImpl.checkDestroyed.()V
|
||||
java/io/DataOutputStream.flush.()V
|
||||
com/sun/midp/midletsuite/MIDletSuiteImpl.guaranteeMIDletSuiteLocked.(Ljava/lang/String;)V
|
||||
com/sun/cldc/i18n/j2me/UTF_8_Reader.read.([CII)I
|
||||
java/io/DataOutputStream.write.([BII)V
|
||||
com/sun/midp/rms/IntToIntMapper.setElementAt.(II)V
|
||||
java/io/DataOutputStream.writeUTF.(Ljava/lang/String;)V
|
||||
java/io/DataOutputStream.writeUTF.(Ljava/lang/String;Ljava/io/DataOutput;)I
|
||||
java/io/InputStream.<init>.()V
|
||||
java/lang/Character.<init>.(C)V
|
||||
java/io/InputStream.read.([B)I
|
||||
com/sun/midp/midlet/MIDletStateHandler.getMIDletSuite.()Lcom/sun/midp/midlet/MIDletSuite;
|
||||
java/io/Reader.read.([C)I
|
||||
java/io/InputStreamReader.read.([CII)I
|
||||
java/io/InputStreamReader.ensureOpen.()V
|
||||
java/io/DataOutputStream.writeByte.(I)V
|
||||
java/io/ByteArrayOutputStream.toByteArray.()[B
|
||||
java/lang/Integer.intValue.()I
|
||||
java/io/OutputStream.<init>.()V
|
||||
java/lang/Character.toString.()Ljava/lang/String;
|
||||
com/sun/midp/security/SecurityToken.checkIfPermissionAllowed.(I)V
|
||||
com/sun/midp/security/SecurityToken.checkIfPermissionAllowed.(ILjava/lang/String;)V
|
||||
com/sun/midp/events/EventQueue.registerEventListener.(ILcom/sun/midp/events/EventListener;)V
|
||||
com/sun/midp/midletsuite/MIDletSuiteImpl.getID.()I
|
||||
com/sun/midp/midlet/MIDletStateHandler.getMidletStateHandler.()Lcom/sun/midp/midlet/MIDletStateHandler;
|
||||
com/sun/midp/events/DispatchData.<init>.(Lcom/sun/midp/events/EventListener;)V
|
||||
java/lang/Integer.toUnsignedString.(II)Ljava/lang/String;
|
||||
com/ibm/oti/connection/file/FCOutputStream.flush.()V
|
||||
com/ibm/oti/connection/file/FCOutputStream.write.([BII)V
|
||||
javax/microedition/lcdui/Canvas.repaint.()V
|
||||
javax/microedition/lcdui/CanvasLFImpl.lRepaint.()V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.lRequestPaintContents.()V
|
||||
com/sun/midp/util/isolate/InterIsolateMutex.lock.()V
|
||||
com/sun/midp/rms/RecordStoreSharedDBHeader.updateCachedData.()V
|
||||
java/io/ByteArrayOutputStream.reset.()V
|
||||
com/sun/midp/rms/RecordStoreLock.obtain.()V
|
||||
java/io/DataInputStream.<init>.(Ljava/io/InputStream;)V
|
||||
com/sun/midp/rms/RecordStoreLock.release.()V
|
||||
com/sun/midp/util/isolate/InterIsolateMutex.unlock.()V
|
||||
com/ibm/oti/connection/file/Connection.isOpen.()Z
|
||||
com/sun/midp/rms/RecordStoreImpl.getVersion.()I
|
||||
java/lang/Object.toString.()Ljava/lang/String;
|
||||
java/lang/Integer.toHexString.(I)Ljava/lang/String;
|
||||
com/sun/midp/rms/RecordStoreIndex.getRecordHeader_SearchFromTo.(I[BII)I
|
||||
com/sun/midp/rms/RecordStoreImpl.lockRecordStore.()V
|
||||
com/sun/midp/rms/RecordStoreSharedDBHeader.recordStoreLocked.()V
|
||||
com/sun/midp/rms/RecordStoreImpl.unlockRecordStore.()V
|
||||
com/sun/midp/rms/RecordStoreSharedDBHeader.recordStoreAboutToBeUnlocked.()V
|
||||
java/lang/StringBuffer.append.(Ljava/lang/Object;)Ljava/lang/StringBuffer;
|
||||
com/sun/midp/rms/IntToIntMapper.elementAt.(I)I
|
||||
javax/microedition/io/Connector.checkProtocolName.(Ljava/lang/String;)V
|
||||
javax/microedition/rms/RecordStore.openRecordStore.(Ljava/lang/String;Z)Ljavax/microedition/rms/RecordStore;
|
||||
javax/microedition/rms/RecordStore.doOpen.(ILjava/lang/String;Z)Ljavax/microedition/rms/RecordStore;
|
||||
javax/microedition/rms/RecordStore.closeRecordStore.()V
|
||||
com/sun/midp/rms/RecordStoreImpl.getSize.()I
|
||||
javax/microedition/rms/RecordEnumerationImpl.hasNextElement.()Z
|
||||
java/util/Hashtable.<init>.(I)V
|
||||
javax/microedition/rms/RecordEnumerationImpl.nextRecordId.()I
|
||||
javax/microedition/rms/RecordStore.getRecord.(I)[B
|
||||
com/sun/midp/rms/RecordStoreImpl.getRecord.(I)[B
|
||||
com/sun/midp/rms/RecordStoreIndex.getRecordHeader.(I[B)I
|
||||
com/sun/midp/rms/RecordStoreIndex.ensureIndexValidity.()V
|
||||
com/sun/midp/rms/RecordStoreIndex.getRecordHeader_NoCache.(I[B)I
|
||||
com/sun/midp/rms/IntToIntMapper.addElement.(II)V
|
||||
com/sun/midp/util/Properties.setProperty.(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
||||
java/lang/Thread.init.(Ljava/lang/Runnable;Ljava/lang/String;)V
|
||||
java/lang/Thread.getPriority.()I
|
||||
java/lang/Thread.setPriority.(I)V
|
||||
java/lang/Thread.checkAccess.()V
|
||||
java/lang/RuntimePermission.<init>.(Ljava/lang/String;)V
|
||||
java/security/BasicPermission.<init>.(Ljava/lang/String;)V
|
||||
java/util/Vector.setSize.(I)V
|
||||
java/io/ByteArrayOutputStream.size.()I
|
||||
java/lang/Thread.nextThreadNum.()I
|
||||
com/sun/cldc/io/ResourceInputStream.fixResourceName.(Ljava/lang/String;)Ljava/lang/String;
|
||||
java/lang/Thread.start.()V
|
||||
java/lang/Thread.start.(Ljava/lang/Thread;)V
|
||||
com/ibm/oti/connection/file/Connection.checkRead.()V
|
||||
com/ibm/oti/connection/file/Connection.checkRead.(Ljava/lang/String;)V
|
||||
java/util/Hashtable.<init>.()V
|
||||
com/ibm/oti/connection/file/Connection.parseDirectory.()V
|
||||
javax/microedition/io/Connector.open.(Ljava/lang/String;I)Ljavax/microedition/io/Connection;
|
||||
javax/microedition/io/Connector.open.(Ljava/lang/String;IZ)Ljavax/microedition/io/Connection;
|
||||
javax/microedition/io/Connector.openPrim.(Ljava/lang/String;IZ)Ljavax/microedition/io/Connection;
|
||||
com/ibm/oti/connection/file/Connection.existsInternal.()Z
|
||||
javax/microedition/lcdui/Display$DisplayEventConsumerImpl.handleKeyEvent.(II)V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.uCallKeyEvent.(II)V
|
||||
javax/microedition/lcdui/CanvasLFImpl.allowKey.(I)Z
|
||||
com/ibm/oti/connection/file/Connection.isDirectoryInternal.()Z
|
||||
java/util/Vector.isEmpty.()Z
|
||||
java/util/Hashtable.rehash.()V
|
||||
java/lang/Class.getResourceAsStream.(Ljava/lang/String;)Ljava/io/InputStream;
|
||||
com/sun/cldc/io/ResourceInputStream.<init>.(Ljava/lang/String;)V
|
||||
com/sun/midp/io/j2me/file/Protocol.<init>.()V
|
||||
com/sun/midp/io/j2me/file/Protocol.openPrim.(Ljava/lang/String;IZ)Ljavax/microedition/io/Connection;
|
||||
com/ibm/oti/connection/file/Connection.<init>.()V
|
||||
com/ibm/oti/connection/file/Connection.setParameters2.(Ljava/lang/String;IZ)Ljavax/microedition/io/Connection;
|
||||
com/ibm/oti/connection/file/Connection.setParameters.(Ljava/lang/String;IZ)V
|
||||
com/ibm/oti/connection/file/Connection.validateSpec.(Ljava/lang/String;)Ljava/lang/String;
|
||||
com/ibm/oti/connection/file/Connection.setPaths.(Ljava/lang/String;)V
|
||||
com/ibm/oti/connection/file/Connection.getPlatformPath.(Ljava/lang/String;)Ljava/lang/String;
|
||||
com/ibm/oti/connection/file/Connection.checkSecurity.(Ljava/lang/String;)V
|
||||
java/lang/Thread.<init>.()V
|
||||
java/lang/Boolean.equals.(Ljava/lang/Object;)Z
|
||||
com/ibm/oti/connection/file/Connection.close.()V
|
||||
java/lang/Integer.equals.(Ljava/lang/Object;)Z
|
||||
com/sun/cldc/io/ResourceInputStream.close.()V
|
||||
java/io/DataInputStream.readByte.()B
|
||||
java/io/OutputStream.close.()V
|
||||
com/nokia/mid/ui/TextEditorThread.run.()V
|
||||
java/util/Vector.insertElementAt.(Ljava/lang/Object;I)V
|
||||
java/io/ByteArrayOutputStream.close.()V
|
||||
java/util/Hashtable$HashtableEnumerator.hasMoreElements.()Z
|
||||
com/ibm/oti/connection/file/Connection.fileSize.()J
|
||||
java/lang/Exception.<init>.()V
|
||||
java/lang/Throwable.<init>.()V
|
||||
java/io/ByteArrayOutputStream.<init>.(I)V
|
||||
javax/microedition/lcdui/ImageDataFactory.getImageDataFromStream.(Ljavax/microedition/lcdui/ImageData;Ljava/io/InputStream;)V
|
||||
javax/microedition/lcdui/CanvasLFImpl.uCallKeyReleased.(I)V
|
||||
javax/microedition/lcdui/Canvas.keyReleased.(I)V
|
||||
com/ibm/oti/connection/file/Connection.exists.()Z
|
||||
com/sun/midp/security/SecurityInitializer.requestToken.(Lcom/sun/midp/security/ImplicitlyTrustedClass;)Lcom/sun/midp/security/SecurityToken;
|
||||
com/sun/midp/security/SecurityInitializerImpl.requestToken.(Lcom/sun/midp/security/ImplicitlyTrustedClass;)Lcom/sun/midp/security/SecurityToken;
|
||||
com/sun/midp/security/SecurityInitializerImpl.isTrusted.(Ljava/lang/Object;)Z
|
||||
java/io/DataOutputStream.<init>.(Ljava/io/OutputStream;)V
|
||||
java/io/DataOutputStream.close.()V
|
||||
javax/microedition/lcdui/CanvasLFImpl.uCallKeyPressed.(I)V
|
||||
javax/microedition/lcdui/Canvas.keyPressed.(I)V
|
||||
com/sun/midp/events/NativeEvent.<init>.(I)V
|
||||
com/ibm/oti/connection/file/Connection.openOutputStream.(J)Ljava/io/OutputStream;
|
||||
com/ibm/oti/connection/file/FCOutputStream.<init>.([BJLcom/ibm/oti/connection/file/Connection;)V
|
||||
com/sun/midp/rms/RecordStoreImpl.<init>.(Lcom/sun/midp/security/SecurityToken;ILjava/lang/String;Z)V
|
||||
java/lang/Character.toUpperCase.(C)C
|
||||
com/sun/midp/events/NativeEvent.<init>.()V
|
||||
java/util/Hashtable.clear.()V
|
||||
com/sun/cldc/util/j2me/CalendarImpl.floorDivide.(II[I)I
|
||||
java/io/ByteArrayInputStream.close.()V
|
||||
com/sun/cldc/i18n/Helper.normalizeEncodingName.(Ljava/lang/String;)Ljava/lang/String;
|
||||
com/sun/midp/midletsuite/MIDletSuiteImpl.getProperty.(Ljava/lang/String;)Ljava/lang/String;
|
||||
com/sun/midp/midletsuite/SuiteProperties.getProperty.(Ljava/lang/String;)Ljava/lang/String;
|
||||
com/sun/midp/util/Properties.getProperty.(Ljava/lang/String;)Ljava/lang/String;
|
||||
com/ibm/oti/connection/file/Connection.checkWrite.()V
|
||||
javax/microedition/lcdui/DisplayableLFImpl.lGetDisplayable.()Ljavax/microedition/lcdui/Displayable;
|
||||
com/sun/midp/security/SecurityInitializerImpl.<init>.(Lcom/sun/midp/security/SecurityToken;[Ljava/lang/String;)V
|
||||
com/sun/midp/midletsuite/SuiteProperties.loadProperties.()V
|
||||
com/sun/midp/rms/RecordStoreIndex.getRecordIDs.()[I
|
||||
java/io/DataInputStream.readLong.()J
|
||||
com/sun/midp/main/MIDletProxyList.notifyListenersOfProxyUpdate.(Lcom/sun/midp/main/MIDletProxy;I)V
|
||||
com/nokia/mid/s40/codec/DataEncoder.<init>.(Ljava/lang/String;)V
|
||||
java/lang/Exception.<init>.(Ljava/lang/String;)V
|
||||
java/lang/Throwable.<init>.(Ljava/lang/String;)V
|
||||
java/util/Vector.removeElement.(Ljava/lang/Object;)Z
|
||||
com/ibm/oti/connection/file/FCOutputStream.close.()V
|
||||
com/ibm/oti/connection/file/Connection.notifyOutputStreamClosed.()V
|
||||
javax/microedition/lcdui/Display.getCurrent.()Ljavax/microedition/lcdui/Displayable;
|
||||
javax/microedition/lcdui/Image.createImage.(Ljava/lang/String;)Ljavax/microedition/lcdui/Image;
|
||||
javax/microedition/lcdui/ImageDataFactory.createResourceImageData.(Ljava/lang/String;)Ljavax/microedition/lcdui/ImageData;
|
||||
javax/microedition/lcdui/ImageData.<init>.()V
|
||||
javax/microedition/lcdui/ImageDataFactory.loadAndCreateImmutableImageDataFromCache.(Ljavax/microedition/lcdui/ImageData;Ljava/lang/String;)Z
|
||||
javax/microedition/lcdui/SuiteImageCacheImpl.loadAndCreateImmutableImageData.(Ljavax/microedition/lcdui/ImageData;Ljava/lang/String;)Z
|
||||
com/sun/midp/io/Util.toJavaString.([B)Ljava/lang/String;
|
||||
java/util/Hashtable$HashtableEnumerator.nextElement.()Ljava/lang/Object;
|
||||
com/sun/midp/lcdui/DisplayDevice.isPrimaryDisplay.()Z
|
||||
com/sun/midp/main/MIDletProxy.getClassName.()Ljava/lang/String;
|
||||
com/sun/midp/rms/RmsEnvironment.getSecureFilenameBase.(I)Ljava/lang/String;
|
||||
com/sun/midp/midletsuite/SuiteContainerAdapter.getSecureFilenameBase.(I)Ljava/lang/String;
|
|
@ -0,0 +1,9 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
|
||||
// Instead of being loaded directly, this is appended to config/midlet.js
|
||||
// by package.sh at `make app` build time, so it only applies when the app
|
||||
// is loaded as an open web app.
|
||||
|
||||
config.autosize = "1";
|
||||
config.logConsole = "web";
|
|
@ -1,4 +1,7 @@
|
|||
// Midlet-specific customization code.
|
||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
|
||||
'use strict';
|
||||
|
||||
var MIDlet = {
|
||||
name: "aMIDlet",
|
||||
|
@ -12,6 +15,8 @@ var MIDlet = {
|
|||
};
|
||||
|
||||
var config = {
|
||||
main: "com/sun/midp/main/MIDletSuiteLoader",
|
||||
midletClassName: "RunTests",
|
||||
};
|
||||
|
||||
// The base directory of the app, relative to the current page. Normally this
|
|
@ -0,0 +1,5 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
|
||||
'use strict';
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
* Keep this list up-to-date!
|
||||
*/
|
||||
|
||||
var urlParams = (function() {
|
||||
(function() {
|
||||
var params = {};
|
||||
|
||||
location.search.substring(1).split("&").forEach(function (param) {
|
||||
|
@ -42,9 +42,11 @@ var urlParams = (function() {
|
|||
|
||||
params.args = (params.args || "").split(",");
|
||||
|
||||
if ("midletClassName" in params) {
|
||||
params.midletClassName = params.midletClassName.replace(/\//g, '.');
|
||||
}
|
||||
|
||||
for (var name in params) {
|
||||
config[name] = params[name];
|
||||
}
|
||||
|
||||
return params;
|
||||
})();
|
|
@ -7,8 +7,10 @@
|
|||
<link rel="stylesheet" type="text/css" href="style/index.css">
|
||||
<script type="text/javascript" src="libs/load.js" defer></script>
|
||||
<script type="text/javascript" src="libs/promise-6.0.0.js" defer></script>
|
||||
<script type="text/javascript" src="midlet.js" defer></script>
|
||||
<script type="text/javascript" src="libs/urlparams.js" defer></script>
|
||||
<script type="text/javascript" src="config/default.js" defer></script>
|
||||
<script type="text/javascript" src="config/midlet.js" defer></script>
|
||||
<script type="text/javascript" src="config/build.js" defer></script>
|
||||
<script type="text/javascript" src="config/urlparams.js" defer></script>
|
||||
<script type="text/javascript" src="timer.js" defer></script>
|
||||
<script type="text/javascript" src="index.js" defer></script>
|
||||
</head>
|
||||
|
|
3
index.js
3
index.js
|
@ -7,9 +7,8 @@
|
|||
* Pre-load dependencies and then load the main page.
|
||||
*/
|
||||
(function() {
|
||||
var midletClassName = config.midletClassName ? config.midletClassName.replace(/\//g, '.') : "RunTests";
|
||||
var loadingPromises = [];
|
||||
if (midletClassName == "RunTests") {
|
||||
if (config.midletClassName == "RunTests") {
|
||||
loadingPromises.push(loadScript("tests/contacts.js"),
|
||||
loadScript("tests/index.js"));
|
||||
}
|
||||
|
|
|
@ -70,9 +70,6 @@ module J2ME {
|
|||
"java/lang/Class.invoke_clinit.()V": YieldReason.Root,
|
||||
"java/lang/Class.newInstance.()Ljava/lang/Object;": YieldReason.Root,
|
||||
"java/lang/Thread.yield.()V": YieldReason.Root,
|
||||
"javax/microedition/lcdui/Graphics.drawString.(Ljava/lang/String;III)V": YieldReason.Root,
|
||||
"javax/microedition/lcdui/Graphics.drawSubstring.(Ljava/lang/String;IIIII)V": YieldReason.Root,
|
||||
"javax/microedition/lcdui/Graphics.drawChars.([CIIIII)V": YieldReason.Root,
|
||||
// Test Files:
|
||||
"gnu/testlet/vm/NativeTest.throwExceptionAfterPause.()V": YieldReason.Root,
|
||||
"gnu/testlet/vm/NativeTest.returnAfterPause.()I": YieldReason.Root,
|
||||
|
|
|
@ -236,7 +236,7 @@ module J2ME {
|
|||
var failedCompilations = 0;
|
||||
|
||||
function compileClassInfo(emitter: Emitter, classInfo: ClassInfo,
|
||||
methodFilter: (methodInfo: MethodInfo) => boolean,
|
||||
methodFilterList: string[],
|
||||
ctx: Context): CompiledMethodInfo [] {
|
||||
var writer = emitter.writer;
|
||||
var mangledClassName = classInfo.mangledName;
|
||||
|
@ -272,7 +272,7 @@ module J2ME {
|
|||
if (!method.code) {
|
||||
continue;
|
||||
}
|
||||
if (!methodFilter(method)) {
|
||||
if (methodFilterList !== null && methodFilterList.indexOf(method.implKey) < 0) {
|
||||
continue;
|
||||
}
|
||||
var mangledMethodName = method.mangledName;
|
||||
|
@ -296,6 +296,9 @@ module J2ME {
|
|||
failedCompilations ++;
|
||||
}
|
||||
if (compiledMethod && compiledMethod.body) {
|
||||
if (methodFilterList) {
|
||||
methodFilterList.splice(methodFilterList.indexOf(method.implKey), 1);
|
||||
}
|
||||
var compiledMethodName = mangledClassAndMethodName;
|
||||
writer.enter("function " + compiledMethodName + "(" + compiledMethod.args.join(",") + ") {");
|
||||
writer.writeLns(compiledMethod.body);
|
||||
|
@ -356,7 +359,7 @@ module J2ME {
|
|||
export function compile(jvm: any,
|
||||
jarFilter: (jarFile: string) => boolean,
|
||||
classFilter: (classInfo: ClassInfo) => boolean,
|
||||
methodFilter: (methodInfo: MethodInfo) => boolean,
|
||||
methodFilterList: string[],
|
||||
fileFilter: string, debugInfo: boolean, tsDefinitions: boolean) {
|
||||
var runtime = new Runtime(jvm);
|
||||
var jarFiles = CLASSES.jarFiles;
|
||||
|
@ -440,7 +443,7 @@ module J2ME {
|
|||
var methods = classInfo.methods;
|
||||
for (var j = 0; j < methods.length; j++) {
|
||||
var method = methods[j];
|
||||
if (methodFilter(method)) {
|
||||
if (methodFilterList === null || methodFilterList.indexOf(method.implKey) >= 0) {
|
||||
// If at least one method is found, compile the class.
|
||||
filteredClassInfoList.push(classInfo);
|
||||
break;
|
||||
|
@ -458,7 +461,7 @@ module J2ME {
|
|||
if (classInfo.isInterface) {
|
||||
continue;
|
||||
}
|
||||
ArrayUtilities.pushMany(compiledMethods, compileClassInfo(emitter, classInfo, methodFilter, ctx));
|
||||
ArrayUtilities.pushMany(compiledMethods, compileClassInfo(emitter, classInfo, methodFilterList, ctx));
|
||||
}
|
||||
|
||||
var color = failedCompilations ? IndentingWriter.YELLOW : IndentingWriter.GREEN;
|
||||
|
|
33
jsc.ts
33
jsc.ts
|
@ -211,7 +211,7 @@ module J2ME {
|
|||
classNameList = file.replace(/\r?\n/g, "\n").split("\n");
|
||||
}
|
||||
}
|
||||
var methodNameList;
|
||||
var methodFilterList = null;
|
||||
if (methodFileFilterOption.value) {
|
||||
var file;
|
||||
try {
|
||||
|
@ -220,10 +220,16 @@ module J2ME {
|
|||
|
||||
}
|
||||
if (file) {
|
||||
methodNameList = file.replace(/\r?\n/g, "\n").split("\n");
|
||||
|
||||
methodFilterList = [];
|
||||
var lines = file.replace(/\r?\n/g, "\n").split("\n");
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
// Trim Whitespace
|
||||
methodNameList = methodNameList.map(x => x.replace(/^\s+|\s+$/g, ""));
|
||||
var line = lines[i].replace(/^\s+|\s+$/g, "");
|
||||
if (line === "") {
|
||||
continue;
|
||||
}
|
||||
methodFilterList.push(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,17 +247,20 @@ module J2ME {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
function methodFilter(methodInfo: MethodInfo): boolean {
|
||||
if (methodNameList) {
|
||||
return methodNameList.indexOf(methodInfo.implKey) >= 0;
|
||||
} else if (!methodFilterOption.value) {
|
||||
return true;
|
||||
}
|
||||
return methodInfo.implKey === methodFilterOption.value;
|
||||
if (methodFilterOption.value) {
|
||||
methodFilterList = [methodFilterOption.value];
|
||||
}
|
||||
|
||||
stdoutWriter.writeLn("var start = performance.now();");
|
||||
compile(jvm, jarFilter, classFilter, methodFilter, fileFilterOption.value, debuggerOption.value, definitionOption.value);
|
||||
compile(jvm, jarFilter, classFilter, methodFilterList, fileFilterOption.value, debuggerOption.value, definitionOption.value);
|
||||
stdoutWriter.writeLn("console.log(\"Loaded " + jarFileFilterOption.value + " in \" + (performance.now() - start).toFixed(2) + \" ms.\");");
|
||||
if (methodFilterList !== null && methodFilterList.length) {
|
||||
stderrWriter.enter("The following method(s) in the method filter list failed to compile or were not found:");
|
||||
for (var i = 0; i < methodFilterList.length; i++) {
|
||||
stderrWriter.errorLn(methodFilterList[i]);
|
||||
}
|
||||
stderrWriter.leave("");
|
||||
}
|
||||
if (verboseOption.value) {
|
||||
// ...
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* terminal: a faster canvas based console if Shumway.js is included.
|
||||
*/
|
||||
var ENABLED_CONSOLE_TYPES = (config.logConsole || "page").split(",");
|
||||
var minLogLevel = LOG_LEVELS[config.logLevel || "log"];
|
||||
var minLogLevel = LOG_LEVELS[config.logLevel || (config.release ? "error" : "log")];
|
||||
|
||||
|
||||
//================================================================
|
||||
|
|
|
@ -25,7 +25,7 @@ var initialFiles = [
|
|||
var initFS = new Promise(function(resolve, reject) {
|
||||
fs.init(resolve);
|
||||
}).then(function() {
|
||||
if (typeof MIDP !== "undefined" && MIDP.midletClassName == "RunTests") {
|
||||
if (typeof config !== "undefined" && config.midletClassName == "RunTests") {
|
||||
initialDirs.push("/tcktestdir");
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ var initFS = new Promise(function(resolve, reject) {
|
|||
}).then(function() {
|
||||
var filePromises = [];
|
||||
|
||||
if (typeof MIDP !== "undefined" && MIDP.midletClassName == "RunTests") {
|
||||
if (typeof config !== "undefined" && config.midletClassName == "RunTests") {
|
||||
initialFiles.push({ sourcePath: "certs/_test.ks", targetPath: "/_test.ks" });
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,13 @@
|
|||
<link rel="stylesheet" type="text/css" href="style/drawer.css">
|
||||
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
|
||||
<script type="text/javascript" src="midlet.js" defer></script>
|
||||
<script type="text/javascript" src="config/default.js" defer></script>
|
||||
<script type="text/javascript" src="config/midlet.js" defer></script>
|
||||
<script type="text/javascript" src="config/build.js" defer></script>
|
||||
<script type="text/javascript" src="config/urlparams.js" defer></script>
|
||||
<!-- Uncomment the line below to enable the profiler. -->
|
||||
<!--<script type="text/javascript" src="build/shumway.js" defer></script>-->
|
||||
<!--<script type="text/javascript" src="libs/terminal.js" defer></script>-->
|
||||
|
||||
<script type="text/javascript" src="libs/urlparams.js" defer></script>
|
||||
<script type="text/javascript" src="libs/console.js" defer></script>
|
||||
<script type="text/javascript" src="legacy.js" defer></script>
|
||||
<script type="text/javascript" src="blackBox.js" defer></script>
|
||||
|
@ -61,7 +62,7 @@
|
|||
<script type="text/javascript" src="game-ui.js" defer></script>
|
||||
|
||||
<!-- run make aot to generate these -->
|
||||
<!--<script type="text/javascript" src="build/classes.jar.js" defer></script>-->
|
||||
<script type="text/javascript" src="build/classes.jar.js" defer></script>
|
||||
<!--<script type="text/javascript" src="build/program.jar.js" defer></script>-->
|
||||
<!--<script type="text/javascript" src="build/tests.jar.js" defer></script>-->
|
||||
<script type="text/javascript" src="main.js" defer></script>
|
||||
|
|
12
main.js
12
main.js
|
@ -3,21 +3,15 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
// To launch the unit tests: ?main=RunTests
|
||||
// To launch the MIDP demo: ?main=com/sun/midp/main/MIDletSuiteLoader&midletClassName=HelloCommandMIDlet
|
||||
// To launch a JAR file: ?main=com/sun/midp/main/MIDletSuiteLoader&args=app.jar
|
||||
|
||||
var jvm = new JVM();
|
||||
|
||||
var main = config.main || "com/sun/midp/main/MIDletSuiteLoader";
|
||||
|
||||
if ("gamepad" in config && !/no|0/.test(config.gamepad)) {
|
||||
document.documentElement.classList.add('gamepad');
|
||||
}
|
||||
|
||||
var jars = ["java/classes.jar"];
|
||||
|
||||
if (MIDP.midletClassName == "RunTests") {
|
||||
if (config.midletClassName == "RunTests") {
|
||||
jars.push("tests/tests.jar");
|
||||
}
|
||||
|
||||
|
@ -171,7 +165,7 @@ if (config.downloadJAD) {
|
|||
}));
|
||||
}
|
||||
|
||||
if (MIDP.midletClassName == "RunTests") {
|
||||
if (config.midletClassName == "RunTests") {
|
||||
loadingPromises.push(loadScript("tests/native.js"),
|
||||
loadScript("tests/override.js"),
|
||||
loadScript("tests/mozactivitymock.js"));
|
||||
|
@ -194,7 +188,7 @@ function start() {
|
|||
CLASSES.initializeBuiltinClasses();
|
||||
profiler && profiler.start(2000, false);
|
||||
bigBang = performance.now();
|
||||
jvm.startIsolate0(main, config.args);
|
||||
jvm.startIsolate0(config.main, config.args);
|
||||
}
|
||||
|
||||
Promise.all(loadingPromises).then(start);
|
||||
|
|
|
@ -8,8 +8,6 @@ var MIDP = {
|
|||
|
||||
MIDP.manifest = {};
|
||||
|
||||
MIDP.midletClassName = config.midletClassName ? config.midletClassName.replace(/\//g, '.') : "RunTests";
|
||||
|
||||
Native["com/sun/midp/jarutil/JarReader.readJarEntry0.(Ljava/lang/String;Ljava/lang/String;)[B"] = function(jar, entryName) {
|
||||
var bytes = CLASSES.loadFileFromJar(util.fromJavaString(jar), util.fromJavaString(entryName));
|
||||
if (!bytes)
|
||||
|
@ -254,9 +252,9 @@ Native["com/sun/midp/main/CldcPlatformRequest.dispatchPlatformRequest.(Ljava/lan
|
|||
};
|
||||
|
||||
Native["com/sun/midp/main/CommandState.restoreCommandState.(Lcom/sun/midp/main/CommandState;)V"] = function(state) {
|
||||
var suiteId = (MIDP.midletClassName === "internal") ? -1 : 1;
|
||||
var suiteId = (config.midletClassName === "internal") ? -1 : 1;
|
||||
state.klass.classInfo.getField("I.suiteId.I").set(state, suiteId);
|
||||
state.klass.classInfo.getField("I.midletClassName.Ljava/lang/String;").set(state, J2ME.newString(MIDP.midletClassName));
|
||||
state.klass.classInfo.getField("I.midletClassName.Ljava/lang/String;").set(state, J2ME.newString(config.midletClassName));
|
||||
var args = config.args;
|
||||
state.klass.classInfo.getField("I.arg0.Ljava/lang/String;").set(state, J2ME.newString((args.length > 0) ? args[0] : ""));
|
||||
state.klass.classInfo.getField("I.arg1.Ljava/lang/String;").set(state, J2ME.newString((args.length > 1) ? args[1] : ""));
|
||||
|
@ -400,7 +398,7 @@ Native["com/sun/midp/main/Configuration.getProperty0.(Ljava/lang/String;)Ljava/l
|
|||
var value;
|
||||
switch (util.fromJavaString(key)) {
|
||||
case "com.sun.midp.publickeystore.WebPublicKeyStore":
|
||||
if (MIDP.midletClassName == "RunTests") {
|
||||
if (config.midletClassName == "RunTests") {
|
||||
value = "_test.ks";
|
||||
} else {
|
||||
value = "_main.ks";
|
||||
|
|
|
@ -1194,7 +1194,7 @@ module J2ME {
|
|||
// Some Native MethodInfos are constructed but never called;
|
||||
// that's fine, unless we actually try to call them.
|
||||
return function missingImplementation() {
|
||||
stderrWriter.errorLn("implKey " + methodInfo.name + " is native but does not have an implementation.");
|
||||
stderrWriter.errorLn("implKey " + methodInfo.implKey + " is native but does not have an implementation.");
|
||||
}
|
||||
}
|
||||
} else if (implKey in Override) {
|
||||
|
|
|
@ -31,6 +31,12 @@ cp -R classfile $PACKAGE_DIR/.
|
|||
# copy entire contents of libs dir
|
||||
cp -R libs $PACKAGE_DIR/.
|
||||
|
||||
# copy entire contents of config dir
|
||||
cp -R config $PACKAGE_DIR/.
|
||||
|
||||
# Merge app.js into a config file that gets loaded.
|
||||
cat $PACKAGE_DIR/config/app.js >> $PACKAGE_DIR/config/midlet.js && rm $PACKAGE_DIR/config/app.js
|
||||
|
||||
# copy entire contents of midp dir
|
||||
cp -R midp $PACKAGE_DIR/.
|
||||
|
||||
|
|
22
utilities.ts
22
utilities.ts
|
@ -965,6 +965,27 @@ module J2ME {
|
|||
}
|
||||
|
||||
export module HashUtilities {
|
||||
// Copyright (c) 2011 Gary Court
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// https://github.com/garycourt/murmurhash-js
|
||||
export function hashBytesTo32BitsMurmur(data: Uint8Array, offset: number, length: number) {
|
||||
var l = length, h = 0x12345678 ^ l, i = offset, k;
|
||||
|
@ -992,6 +1013,7 @@ module J2ME {
|
|||
h ^= h >>> 15;
|
||||
return h >>> 0;
|
||||
}
|
||||
// end of imported section
|
||||
|
||||
export function hashBytesTo32BitsAdler(data: Uint8Array, offset: number, length: number): number {
|
||||
var a = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче