Index: .circleci/config.yml
==================================================================
--- .circleci/config.yml
+++ .circleci/config.yml
@@ -11,332 +11,80 @@
version: 2.1
executors:
buildenv:
docker:
- image: circleci/openjdk:8-jdk
- working_directory: ~/squirreljme-build
orbs:
win: circleci/windows@2.2.0
-commands:
- initialize_buildenv:
- description: "Initializes the build environment"
- steps:
- - checkout:
- path: ~/squirreljme
- - run:
- name: Setup directories
- command: mkdir -p ~/squirreljme-build /tmp/summercoat /tmp/summercoat-test
- - run:
- name: Install build-essential
- command: sudo apt-get install --no-install-recommends -y build-essential || true
- - run:
- name: Install crossbuild-essential-powerpc
- command: sudo apt-get install --no-install-recommends -y crossbuild-essential-powerpc || true
- - run:
- name: Install crossbuild-essential-mips
- command: sudo apt-get install --no-install-recommends -y crossbuild-essential-mips || true
- - run:
- name: Install crossbuild-essential-mipsel
- command: sudo apt-get install --no-install-recommends -y crossbuild-essential-mipsel || true
- - run:
- name: Install qemu-user
- command: sudo apt-get install --no-install-recommends -y qemu-user || true
- - run:
- name: Install unzip
- command: sudo apt-get install --no-install-recommends -y unzip || true
-
jobs:
- build_javase_windows:
+ build_windows:
executor:
name: win/default
shell: cmd.exe
steps:
- - checkout:
- path: c:\users\circleci\squirreljme
- - run:
- name: Make build directory
- command: mkdir c:\users\circleci\squirreljme-build
- - run:
- name: Go to build directory
- command: cd c:\users\circleci\squirreljme-build
- - run:
- name: Perform Shaded Java SE Build
- command: c:\users\circleci\squirreljme\build.cmd dist javase
- build_javase:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Shade JavaSE
- command: ~/squirreljme/build.sh dist javase
- build_javame:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Shade JavaME
- command: ~/squirreljme/build.sh dist javame
- build_summercoatrom:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Building SummerCoat ROM
- command: ~/squirreljme/build.sh dist summercoatrom
- - run:
- name: UnZip SummerCoat ROM
- command: unzip -o squirreljme-summercoatrom.zip
- - run:
- name: Copy ROM file
- command: cp -v squirreljme.sqc /tmp/summercoat/squirreljme.sqc
- - persist_to_workspace:
- root: /tmp/summercoat
- paths:
- - squirreljme.sqc
- build_summercoatromtest:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Building SummerCoat Test ROM
- command: ~/squirreljme/build.sh dist summercoatrom-test
- - run:
- name: UnZip SummerCoat ROM
- command: unzip -o squirreljme-summercoatrom-test.zip
- - run:
- name: Copy ROM file
- command: cp -v squirreljme.sqc /tmp/summercoat-test/squirreljme.sqc
- - persist_to_workspace:
- root: /tmp/summercoat-test
- paths:
- - squirreljme.sqc
- tests_baseline:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Clear old test results and snapshot
- command: rm -f bljut/baseline/results.xml baseline.nps
- - run:
- name: Create test directory
- command: mkdir -p bljut/baseline
- - run:
- name: Running Baseline Tests
- command: ~/squirreljme/utils-dev/hostedlaunch.sh tac-runner > bljut/baseline/results.xml
- - store_test_results:
- path: bljut
- tests_springcoat:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Clear old test results and snapshot
- command: rm -f spjut/springcoat/results.xml springcoat.nps
- - run:
- name: Create test directory
- command: mkdir -p spjut/springcoat
- - run:
- name: Running SpringCoat VM
- command: ~/squirreljme/build.sh launch -v springcoat -n springcoat.nps -Dcc.squirreljme.debug=false tac-runner > spjut/springcoat/results.xml
- no_output_timeout: 30m
- - store_test_results:
- path: spjut
- - store_artifacts:
- path: springcoat.nps
- destination: /nps/springcoat.nps
- tests_summercoat:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Clear old test results and snapshot
- command: rm -f sujut/summercoat/results.xml summercoat.nps
- - run:
- name: Create test directory
- command: mkdir -p sujut/summercoat
- - run:
- name: Running SummerCoat VM
- command: ~/squirreljme/build.sh launch -v summercoat -n summercoat.nps -Dcc.squirreljme.debug=false tac-runner > sujut/summercoat/results.xml
- - store_test_results:
- path: sujut
- - store_artifacts:
- path: summercoat.nps
- destination: /nps/summercoat.nps
- tests_summercoatrom:
- executor: buildenv
- steps:
- - initialize_buildenv
- - attach_workspace:
- at: /tmp/summercoat-test
- - run:
- name: Clear old test results and snapshot
- command: rm -f svjut/summercoatrom/results.xml summercoatrom.nps
- - run:
- name: Create test directory
- command: mkdir -p svjut/summercoatrom
- - run:
- name: Take SummerCoat Test ROM
- command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- - run:
- name: Running SummerCoat VM
- command: ~/squirreljme/build.sh launch -v summercoat -n summercoatrom.nps -Dcc.squirreljme.debug=false -Dcc.squirreljme.romfile=squirreljme.sqc tac-runner > svjut/summercoatrom/results.xml
- - store_test_results:
- path: svjut
- - store_artifacts:
- path: summercoatrom.nps
- destination: /nps/summercoatrom.nps
- tests_ratufacoat_default:
- executor: buildenv
- steps:
- - initialize_buildenv
- - attach_workspace:
- at: /tmp/summercoat-test
- - run:
- name: Clear old test results and snapshot
- command: rm -f rdjut/ratufacoatdef/results.xml
- - run:
- name: Create test directory
- command: mkdir -p rdjut/ratufacoatdef
- - run:
- name: Take SummerCoat Test ROM
- command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- - run:
- name: Cleaning RatufaCoat VM (Default)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- - run:
- name: Building RatufaCoat VM (Default)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc
- - run:
- name: Running RatufaCoat VM (Default)
- command: ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rdjut/ratufacoatdef/results.xml
- - store_test_results:
- path: rdjut
- tests_ratufacoat_ppc:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Halt if compiler not available
- command: if ! which powerpc-linux-gnu-gcc; then circleci-agent step halt; fi
- - attach_workspace:
- at: /tmp/summercoat-test
- - run:
- name: Clear old test results and snapshot
- command: rm -f rpjut/ratufacoatppc/results.xml
- - run:
- name: Create test directory
- command: mkdir -p rpjut/ratufacoatppc
- - run:
- name: Take SummerCoat Test ROM
- command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- - run:
- name: Cleaning RatufaCoat VM (PowerPC)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- - run:
- name: Building RatufaCoat VM (PowerPC)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc CC=powerpc-linux-gnu-gcc CFLAGS='-static -DSJME_BIG_ENDIAN'
- - run:
- name: Running RatufaCoat VM (PowerPC)
- command: qemu-ppc ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rpjut/ratufacoatppc/results.xml
- - store_test_results:
- path: rpjut
- tests_ratufacoat_mips:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Halt if compiler not available
- command: if ! which mips-linux-gnu-gcc; then circleci-agent step halt; fi
- - attach_workspace:
- at: /tmp/summercoat-test
- - run:
- name: Clear old test results and snapshot
- command: rm -f rmjut/ratufacoatmips/results.xml
- - run:
- name: Create test directory
- command: mkdir -p rmjut/ratufacoatmips
- - run:
- name: Take SummerCoat Test ROM
- command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- - run:
- name: Cleaning RatufaCoat VM (MIPS EB)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- - run:
- name: Building RatufaCoat VM (MIPS EB)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc CC=mips-linux-gnu-gcc CFLAGS='-static -DSJME_BIG_ENDIAN'
- - run:
- name: Running RatufaCoat VM (MIPS EB)
- command: qemu-mips ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rmjut/ratufacoatmips/results.xml
- - store_test_results:
- path: rmjut
- tests_ratufacoat_mipsel:
- executor: buildenv
- steps:
- - initialize_buildenv
- - run:
- name: Halt if compiler not available
- command: if ! which mipsel-linux-gnu-gcc; then circleci-agent step halt; fi
- - attach_workspace:
- at: /tmp/summercoat-test
- - run:
- name: Clear old test results and snapshot
- command: rm -f rnjut/ratufacoatmipsel/results.xml
- - run:
- name: Create test directory
- command: mkdir -p rnjut/ratufacoatmipsel
- - run:
- name: Take SummerCoat Test ROM
- command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- - run:
- name: Cleaning RatufaCoat VM (MIPS EL)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- - run:
- name: Building RatufaCoat VM (MIPS EL)
- command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc CC=mipsel-linux-gnu-gcc CFLAGS='-static -DSJME_LITTLE_ENDIAN'
- - run:
- name: Running RatufaCoat VM (MIPS EL)
- command: qemu-mipsel ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rnjut/ratufacoatmipsel/results.xml
- - store_test_results:
- path: rnjut
+ - checkout
+ - run:
+ name: Gradle Build
+ command: gradlew build --continue --parallel
+ shell: cmd.exe
+ - run:
+ name: Save test results
+ command: |
+ mkdir -p /c/users/circleci/test-results/junit
+ /usr/bin/find . -type f -regex '.*/build/test-results/.*xml' -exec cp {} /c/users/circleci/test-results/junit/ \;
+ when: always
+ shell: bash.exe
+ - store_test_results:
+ path: c:\users\circleci\test-results
+ - store_artifacts:
+ path: c:\users\circleci\test-results
+ build_linux:
+ executor: buildenv
+ steps:
+ - checkout
+ - run:
+ name: Gradle Build
+ command: ./gradlew build --continue --parallel
+ - run:
+ name: Save test results
+ command: |
+ mkdir -p ~/test-results/junit/
+ find . -type f -regex '.*/build/test-results/.*xml' -exec cp {} ~/test-results/junit/ \;
+ when: always
+ - store_test_results:
+ path: ~/test-results
+ - store_artifacts:
+ path: ~/test-results/junit
+ build_macosx:
+ macos:
+ xcode: 11.3.0
+ steps:
+ - checkout
+ - run:
+ name: Update Brew
+ command: brew update
+ - run:
+ name: Install Gradle and OpenJDK 11
+ command: brew install gradle openjdk@11
+ - run:
+ name: Gradle Build
+ command: ./gradlew build --continue --parallel
+ - run:
+ name: Save test results
+ command: |
+ mkdir -p ~/test-results/junit/
+ find . -type f -regex '.*/build/test-results/.*xml' -exec cp {} ~/test-results/junit/ \;
+ when: always
+ - store_test_results:
+ path: ~/test-results
+ - store_artifacts:
+ path: ~/test-results/junit
workflows:
version: 2
tests:
jobs:
- - build_javase
- - build_javame
- - build_javase_windows:
- requires:
- - build_javase
- - tests_baseline:
- requires:
- - build_javase
- - build_summercoatrom:
- requires:
- - build_javase
- - build_javame
- - build_summercoatromtest:
- requires:
- - build_summercoatrom
- - tests_springcoat:
- requires:
- - build_javase
- - tests_summercoat:
- requires:
- - build_javase
- - tests_summercoatrom:
- requires:
- - build_summercoatromtest
- - tests_ratufacoat_default:
- requires:
- - build_summercoatromtest
- - tests_ratufacoat_ppc:
- requires:
- - build_summercoatromtest
- - tests_ratufacoat_mips:
- requires:
- - build_summercoatromtest
- - tests_ratufacoat_mipsel:
- requires:
- - build_summercoatromtest
+ - build_windows
+ - build_linux
+ - build_macosx
ADDED .fossil-settings/binary-glob
Index: .fossil-settings/binary-glob
==================================================================
--- /dev/null
+++ .fossil-settings/binary-glob
@@ -0,0 +1,1 @@
+gradle/wrapper/gradle-wrapper.jar
Index: .fossil-settings/ignore-glob
==================================================================
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -58,15 +58,23 @@
*.dll
*.exe
*.ttyrec
*.patch
*.diff
+
+# Gradle building
+.gradle
+modules/build
+modules/*/build
+emulators/build
+emulators/*/build
+tools/build
+tools/*/build
+buildSrc/build
# Files which should be mime encoded
-*.png
*.xcf
-*.png
*.bmp
*.mid
*.midi
*.wav
*.aif
ADDED .gitattributes
Index: .gitattributes
==================================================================
--- /dev/null
+++ .gitattributes
@@ -0,0 +1,3 @@
+# Do not automatically adjust line endings so that way the line-feeds are
+# the same and consistent
+* text=false
ADDED .github/workflows/build.yaml
Index: .github/workflows/build.yaml
==================================================================
--- /dev/null
+++ .github/workflows/build.yaml
@@ -0,0 +1,16 @@
+name: Build
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+ - name: Build
+ run: ./gradlew build --continue --parallel
ADDED .github/workflows/validate-gradle-wrapper.yaml
Index: .github/workflows/validate-gradle-wrapper.yaml
==================================================================
--- /dev/null
+++ .github/workflows/validate-gradle-wrapper.yaml
@@ -0,0 +1,10 @@
+name: "Validate Gradle Wrapper"
+on: [push, pull_request]
+
+jobs:
+ validation:
+ name: "Validation"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: gradle/wrapper-validation-action@v1
Index: .gitignore
==================================================================
--- .gitignore
+++ .gitignore
@@ -58,15 +58,23 @@
*.dll
*.exe
*.ttyrec
*.patch
*.diff
+
+# Gradle building
+.gradle
+modules/build
+modules/*/build
+emulators/build
+emulators/*/build
+tools/build
+tools/*/build
+buildSrc/build
# Files which should be mime encoded
-*.png
*.xcf
-*.png
*.bmp
*.mid
*.midi
*.wav
*.aif
ADDED .idea/checkstyle-idea.xml
Index: .idea/checkstyle-idea.xml
==================================================================
--- /dev/null
+++ .idea/checkstyle-idea.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
ADDED .idea/codeStyles/Project.xml
Index: .idea/codeStyles/Project.xml
==================================================================
--- /dev/null
+++ .idea/codeStyles/Project.xml
@@ -0,0 +1,450 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+ true
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ false
+
+
+ BY_NAME
+
+
+
+
+
+
+ false
+ true
+ false
+ false
+ false
+
+
+ BY_NAME
+
+
+
+
+
+
+ false
+ true
+ true
+ false
+
+
+ BY_NAME
+
+
+
+
+
+
+ false
+ true
+ true
+ false
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ false
+
+
+ BY_NAME
+
+
+
+
+
+
+ true
+ true
+
+
+ BY_NAME
+
+
+
+
+
+ true
+
+ BY_NAME
+
+
+
+
+
+ true
+
+ BY_NAME
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ADDED .idea/codeStyles/codeStyleConfig.xml
Index: .idea/codeStyles/codeStyleConfig.xml
==================================================================
--- /dev/null
+++ .idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
ADDED .idea/compiler.xml
Index: .idea/compiler.xml
==================================================================
--- /dev/null
+++ .idea/compiler.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ADDED .idea/dictionaries/xer.xml
Index: .idea/dictionaries/xer.xml
==================================================================
--- /dev/null
+++ .idea/dictionaries/xer.xml
@@ -0,0 +1,47 @@
+
+
+
+ accel
+ backlight
+ bootram
+ cldc
+ endianess
+ fprintf
+ gawroriski
+ ioob
+ jarray
+ jboolean
+ jbyte
+ jchar
+ jclass
+ jdouble
+ jfield
+ jfloat
+ jint
+ jlong
+ jme's
+ jmethod
+ jnicall
+ jniexport
+ jobject
+ jshort
+ jstring
+ jthrowable
+ jvalue
+ jweak
+ multiphasicapps
+ narg
+ phasic
+ siii
+ siiii
+ siiiii
+ siiiiii
+ siiiiiii
+ siiiiiiii
+ squirreljme
+ stdint
+ targetting
+ vtable
+
+
+
ADDED .idea/fileTemplates/includes/File Header.java
Index: .idea/fileTemplates/includes/File Header.java
==================================================================
--- /dev/null
+++ .idea/fileTemplates/includes/File Header.java
@@ -0,0 +1,8 @@
+// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
+// ---------------------------------------------------------------------------
+// Multi-Phasic Applications: SquirrelJME
+// Copyright (C) Stephanie Gawroriski
+// ---------------------------------------------------------------------------
+// SquirrelJME is under the GNU General Public License v3+, or later.
+// See license.mkd for licensing and copyright information.
+// ---------------------------------------------------------------------------
ADDED .idea/fileTemplates/internal/AnnotationType.java
Index: .idea/fileTemplates/internal/AnnotationType.java
==================================================================
--- /dev/null
+++ .idea/fileTemplates/internal/AnnotationType.java
@@ -0,0 +1,12 @@
+#parse("File Header.java")
+
+#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
+
+/**
+ * Not Described
+ *
+ * @since ${YEAR}/${MONTH}/${DAY}
+ */
+public @interface ${NAME}
+{
+}
ADDED .idea/fileTemplates/internal/Class.java
Index: .idea/fileTemplates/internal/Class.java
==================================================================
--- /dev/null
+++ .idea/fileTemplates/internal/Class.java
@@ -0,0 +1,12 @@
+#parse("File Header.java")
+
+#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
+
+/**
+ * Not Described
+ *
+ * @since ${YEAR}/${MONTH}/${DAY}
+ */
+public class ${NAME}
+{
+}
ADDED .idea/fileTemplates/internal/Enum.java
Index: .idea/fileTemplates/internal/Enum.java
==================================================================
--- /dev/null
+++ .idea/fileTemplates/internal/Enum.java
@@ -0,0 +1,14 @@
+#parse("File Header.java")
+
+#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
+
+/**
+ * Not Described
+ *
+ * @since ${YEAR}/${MONTH}/${DAY}
+ */
+public enum ${NAME}
+{
+ /** End. */
+ ;
+}
ADDED .idea/fileTemplates/internal/Interface.java
Index: .idea/fileTemplates/internal/Interface.java
==================================================================
--- /dev/null
+++ .idea/fileTemplates/internal/Interface.java
@@ -0,0 +1,12 @@
+#parse("File Header.java")
+
+#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
+
+/**
+ * Not Described
+ *
+ * @since ${YEAR}/${MONTH}/${DAY}
+ */
+public interface ${NAME}
+{
+}
ADDED .idea/fileTemplates/internal/package-info.java
Index: .idea/fileTemplates/internal/package-info.java
==================================================================
--- /dev/null
+++ .idea/fileTemplates/internal/package-info.java
@@ -0,0 +1,3 @@
+#parse("File Header.java")
+
+#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
ADDED .idea/gradle.xml
Index: .idea/gradle.xml
==================================================================
--- /dev/null
+++ .idea/gradle.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ADDED .idea/inspectionProfiles/Project_Default.xml
Index: .idea/inspectionProfiles/Project_Default.xml
==================================================================
--- /dev/null
+++ .idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,382 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ADDED .idea/misc.xml
Index: .idea/misc.xml
==================================================================
--- /dev/null
+++ .idea/misc.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
ADDED .idea/squirreljme.iml
Index: .idea/squirreljme.iml
==================================================================
--- /dev/null
+++ .idea/squirreljme.iml
@@ -0,0 +1,2 @@
+
+
DELETED bldt/TIMESPACE.MF
Index: bldt/TIMESPACE.MF
==================================================================
--- bldt/TIMESPACE.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-X-SquirrelJME-Timespace-Title: Build Time
-X-SquirrelJME-Timespace-Type: build
-X-SquirrelJME-Timespace-Description: This contains everything which is
- only available to the SquirrelJME build system. This means that when
- target is to be built, no projects which support building for a given
- target are permitted to be used. This depends on the JIT time projects.
-
DELETED bldt/buildtime.mkd
Index: bldt/buildtime.mkd
==================================================================
--- bldt/buildtime.mkd
+++ /dev/null
@@ -1,9 +0,0 @@
-# Build-time Projects
-
-These are projects which are only available at build-time to run SquirrelJME
-projects.
-
- * `javase/` -- Pseudo-environment for Java SE.
- * `libs/` -- Support libraries for building.
- * `mids/` -- Building support for platforms.
-
DELETED bldt/javase/javase.mkd
Index: bldt/javase/javase.mkd
==================================================================
--- bldt/javase/javase.mkd
+++ /dev/null
@@ -1,7 +0,0 @@
-# JavaSE Pseudo-Environment
-
-This directory contains the pseudo environment for Java SE host systems. It
-still uses the host class libraries but this enables support for simulating a
-basic Java ME environment on Java SE which is not completely compatible as
-such.
-
DELETED bldt/javase/libs/NAMESPACE.MF
Index: bldt/javase/libs/NAMESPACE.MF
==================================================================
--- bldt/javase/libs/NAMESPACE.MF
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-X-SquirrelJME-Namespace-Title: JavaSE Builder Libraries
-X-SquirrelJME-Namespace-Type: liblet
-X-SquirrelJME-Namespace-Description: Libraries which are needed for the
- builder to operate correctly on Java SE systems.
-
DELETED bldt/javase/libs/builder-implementation/META-INF/MANIFEST.MF
Index: bldt/javase/libs/builder-implementation/META-INF/MANIFEST.MF
==================================================================
--- bldt/javase/libs/builder-implementation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-X-SquirrelJME-UUID: fea37c1c-007d-462b-a417-e77f326cdf73
-X-SquirrelJME-Depends: builder-support javase-runtime
-X-SquirrelJME-Error: BM
-X-SquirrelJME-Description: This contains the builder implementation
- which is used to allow the builder to run on Java SE systems.
-Microedition-Configuration: CLDC-1.8
-
DELETED bldt/javase/libs/builder-implementation/META-INF/services/net.multiphasicapps.javac.CompilerService
Index: bldt/javase/libs/builder-implementation/META-INF/services/net.multiphasicapps.javac.CompilerService
==================================================================
--- bldt/javase/libs/builder-implementation/META-INF/services/net.multiphasicapps.javac.CompilerService
+++ /dev/null
@@ -1,1 +0,0 @@
-cc.squirreljme.builder.javase.javac.HostCompilerService
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompiler.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompiler.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompiler.java
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import java.io.PrintStream;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import javax.tools.JavaCompiler;
-import net.multiphasicapps.io.PrintStreamWriter;
-import net.multiphasicapps.javac.Compiler;
-import net.multiphasicapps.javac.CompilerException;
-import net.multiphasicapps.javac.CompilerInput;
-import net.multiphasicapps.javac.CompilerInputLocation;
-import net.multiphasicapps.javac.CompilerOptions;
-import net.multiphasicapps.javac.CompilerOutput;
-import net.multiphasicapps.javac.CompilerPathSet;
-
-/**
- * This is the compiler which utilizes the system Java compiler, if one is
- * available.
- *
- * @since 2017/11/28
- */
-public class HostCompiler
- extends Compiler
-{
- /** The real Java compiler to use. */
- protected final JavaCompiler javac;
-
- /**
- * Initializes the host compiler which uses the given Java compiler.
- *
- * @param __javac The Java compiler to use.
- * @throws NullPointerException On null arguments.
- * @since 2017/11/28
- */
- public HostCompiler(JavaCompiler __javac)
- throws NullPointerException
- {
- if (__javac == null)
- throw new NullPointerException("NARG");
-
- // Set
- this.javac = __javac;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- protected Runnable newCompilerRunnable(CompilerOutput __out,
- PrintStream __log, CompilerOptions __opt,
- CompilerPathSet[][] __paths, CompilerInput[] __input)
- throws CompilerException, NullPointerException
- {
- if (__out == null || __log == null || __opt == null ||
- __paths == null || __input == null)
- throw new NullPointerException("NARG");
-
- JavaCompiler javac = this.javac;
-
- // Decode compilation options
- List options = new ArrayList<>();
-
- // Which Java version to target?
- String targver;
- switch (__opt.version())
- {
- case JAVA_7:
- targver = "1.7";
- break;
-
- // {@squirreljme.error BM01 Unsupported Java version.}
- default:
- throw new CompilerException("BM01");
- }
- options.add("-source");
- options.add(targver);
- options.add("-target");
- options.add(targver);
-
- // Debugging?
- if (__opt.debug())
- options.add("-g");
-
- // Setup file manager lookup of files
- Writer log = new PrintStreamWriter(__log);
- HostFileManager fm = new HostFileManager(__paths, __out);
-
- // Wrap all input to file objects
- Set input = new LinkedHashSet<>();
- for (CompilerInput i : __input)
- input.add(new InputHostFileObject(i));
-
- // Wrap task
- return new HostCompilerRunnable(javac.getTask(
- log, fm, null, options, null, input));
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompilerRunnable.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompilerRunnable.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompilerRunnable.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import javax.tools.JavaCompiler;
-import net.multiphasicapps.javac.CompilationFailedException;
-import net.multiphasicapps.javac.CompilerException;
-
-/**
- * This is the runnable which runs the compilation task.
- *
- * @since 2017/11/29
- */
-public class HostCompilerRunnable
- implements Runnable
-{
- /** The task to run. */
- protected final JavaCompiler.CompilationTask task;
-
- /**
- * Initializes the compiler runnable.
- *
- * @param __t The task to for running.
- * @throws NullPointerException On null arguments.
- * @since 2017/11/29
- */
- public HostCompilerRunnable(JavaCompiler.CompilationTask __t)
- throws NullPointerException
- {
- if (__t == null)
- throw new NullPointerException("NARG");
-
- this.task = __t;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public void run()
- {
- try
- {
- // {@squirreljme.error BM02 Compilation failed.}
- if (!this.task.call())
- throw new CompilationFailedException("BM02");
- }
-
- // {@squirreljme.error BM03 The compiler has failed.}
- catch (RuntimeException e)
- {
- throw new CompilerException("BM03", e);
- }
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompilerService.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompilerService.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostCompilerService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import javax.tools.JavaCompiler;
-import javax.tools.ToolProvider;
-import net.multiphasicapps.javac.Compiler;
-import net.multiphasicapps.javac.CompilerService;
-
-/**
- * This provides the host compiler as a service.
- *
- * @since 2017/11/28
- */
-public class HostCompilerService
- implements CompilerService
-{
- /**
- * {@inheritDoc}
- * @since 2017/11/28
- */
- @Override
- public Compiler createInstance()
- {
- JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
- if (javac == null)
- return null;
- return new HostCompiler(javac);
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostFileManager.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostFileManager.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostFileManager.java
+++ /dev/null
@@ -1,450 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import javax.tools.FileObject;
-import javax.tools.JavaFileManager;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.StandardLocation;
-import net.multiphasicapps.javac.CompilerInput;
-import net.multiphasicapps.javac.CompilerInputLocation;
-import net.multiphasicapps.javac.CompilerOutput;
-import net.multiphasicapps.javac.CompilerPathSet;
-import net.multiphasicapps.javac.NoSuchInputException;
-
-/**
- * This is used by the Java compiler to manage files used by the compiler
- * for compilation and ones which are output.
- *
- * @since 2017/11/29
- */
-public class HostFileManager
- implements StandardJavaFileManager
-{
- /** Paths to search for input within. */
- protected final CompilerPathSet[][] paths;
-
- /** The output for the compiler. */
- protected final CompilerOutput output;
-
- /**
- * Initializes the host file manager.
- *
- * @param __paths Output paths.
- * @param __out Compiler output.
- * @since 2017/11/29
- */
- public HostFileManager(CompilerPathSet[][] __paths, CompilerOutput __out)
- throws NullPointerException
- {
- if (__paths == null || __out == null)
- throw new NullPointerException("NARG");
-
- this.paths = __paths;
- this.output = __out;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public void close()
- throws IOException
- {
- // Flush the output writer so that any entries which are waiting to
- // be written are written to the ZIP
- this.output.flush();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public void flush()
- throws IOException
- {
- // Forward to output
- this.output.flush();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public ClassLoader getClassLoader(JavaFileManager.Location __a)
- {
- // No plug-ins permitted at all
- return null;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public FileObject getFileForInput(JavaFileManager.Location __a,
- String __b, String __c)
- throws IOException
- {
- throw new todo.TODO();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public FileObject getFileForOutput(JavaFileManager.Location __a,
- String __b, String __c, FileObject __d)
- throws IOException
- {
- throw new todo.TODO();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public JavaFileObject getJavaFileForInput(
- JavaFileManager.Location __a, String __b, JavaFileObject.Kind __c)
- throws IOException
- {
- throw new todo.TODO();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public JavaFileObject getJavaFileForOutput(
- JavaFileManager.Location __loc, String __cn, JavaFileObject.Kind __k,
- FileObject __sib)
- throws IOException
- {
- // {@squirreljme.error BM04 Only class file output is supported.}
- if (JavaFileObject.Kind.CLASS != __k)
- throw new IllegalArgumentException("BM04");
-
- // Convert class to "class" name
- String name = __cn.replace('.', '/') + __k.extension;
-
- // Open output file
- return new OutputHostFileObject(this.output, name);
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Iterable extends JavaFileObject> getJavaFileObjects(
- File... __a)
- {
- return getJavaFileObjectsFromFiles(Arrays.asList(__a));
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Iterable extends JavaFileObject> getJavaFileObjects(
- String... __a)
- {
- return getJavaFileObjectsFromStrings(Arrays.asList(__a));
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Iterable extends JavaFileObject>
- getJavaFileObjectsFromFiles(Iterable extends File> __a)
- {
- // Forward call to string version
- Set args = new LinkedHashSet<>();
- for (File f : __a)
- args.add(String.valueOf(f));
- return getJavaFileObjectsFromStrings(args);
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Iterable extends JavaFileObject>
- getJavaFileObjectsFromStrings(Iterable __a)
- {
- Set rv = new LinkedHashSet<>();
- CompilerPathSet[] srcpaths =
- this.paths[CompilerInputLocation.SOURCE.ordinal()];
-
- // Discover files
- for (String s : __a)
- if (s.endsWith(".java"))
- {
- // Go through sources and try to find the first file
- for (CompilerPathSet ps : srcpaths)
- try
- {
- rv.add(new InputHostFileObject(ps.input(s)));
- break;
- }
- catch (NoSuchInputException e)
- {
- }
- }
-
- // {@squirreljme.error BM05 Do not know how to handle getting a
- // file object from the given file name. (The name of the file)}
- else
- throw new IllegalArgumentException(String.format("BM05 %s",
- s));
-
- // Return
- return rv;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Iterable extends File> getLocation(
- JavaFileManager.Location __l)
- {
- // Ignore null
- if (__l == null)
- return null;
-
- // Standard locations
- if (__l instanceof StandardLocation)
- switch ((StandardLocation)__l)
- {
- // This is required for Java 9's compiler to generate
- // code
- case CLASS_OUTPUT:
- return Arrays.asList(new File("squirreljme$//"));
-
- // Unknown
- default:
- return null;
- }
-
- // Unknown
- return null;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public boolean handleOption(String __a, Iterator __b)
- {
- throw new todo.TODO();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public boolean hasLocation(JavaFileManager.Location __a)
- {
- // Only use standard locations
- if (!(__a instanceof StandardLocation))
- return false;
-
- // Depends
- switch ((StandardLocation)__a)
- {
- // Knows class input and output
- case CLASS_OUTPUT:
- case CLASS_PATH:
- case PLATFORM_CLASS_PATH:
- case SOURCE_PATH:
- return true;
-
- // Unknown
- default:
- return false;
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public String inferBinaryName(JavaFileManager.Location __a,
- JavaFileObject __b)
- {
- // Get name
- String name = __b.getName();
-
- // Try to remove the extension
- int ls = name.lastIndexOf('/'),
- ld = name.lastIndexOf('.');
-
- // Remove everything up to the extension
- if (ld > ls && ld >= 0)
- name = name.substring(0, ld);
-
- // Convert any slashes to dots
- return name.replace('/', '.');
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public boolean isSameFile(FileObject __a, FileObject __b)
- {
- throw new todo.TODO();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public int isSupportedOption(String __o)
- {
- // Ignore nulls
- if (__o == null)
- return -1;
-
- // Depends on the options
- switch (__o)
- {
- // Not supported
- case "--multi-release": // Java 9 multi-release JARs
- default:
- return -1;
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Iterable list(JavaFileManager.Location
- __l, String __pk, Set __kinds, boolean __rec)
- throws IOException
- {
- // Setup target
- Set rv = new LinkedHashSet<>();
-
- // Determine which input file source to use
- CompilerPathSet[][] paths = this.paths;
- CompilerPathSet[] usesets;
- if (!(__l instanceof StandardLocation))
- return rv;
- else
- switch ((StandardLocation)__l)
- {
- // Class inputs
- case CLASS_PATH:
- case PLATFORM_CLASS_PATH:
- usesets = paths[CompilerInputLocation.CLASS.ordinal()];
- break;
-
- // Source inputs
- case SOURCE_PATH:
- usesets = paths[CompilerInputLocation.SOURCE.ordinal()];
- break;
-
- // Unknown, return nothing
- default:
- return rv;
- }
-
- // Load in all files from every set
- Set files = new LinkedHashSet<>();
- for (CompilerPathSet set : usesets)
- for (CompilerInput i : set)
- files.add(i);
-
- // Prefix to consider?
- String prefix = (__pk == null ? "" : __pk.replace('.', '/') + "/");
- int prefixn = prefix.length();
-
- // Go through all files
- boolean issource = (__l == StandardLocation.SOURCE_PATH);
- for (CompilerInput f : files)
- {
- String fname = f.fileName();
-
- // Prefix does not match?
- if (!fname.startsWith(prefix))
- continue;
-
- // If not recursive, then the last slash that appears must be
- // at the same length of the prefix
- if (!__rec)
- {
- int ls = Math.max(-1, fname.lastIndexOf('/')) + 1;
- if (ls != prefixn)
- continue;
- }
-
- // Only consider files with these extensions
- boolean hit = false;
- for (JavaFileObject.Kind k : __kinds)
- if (fname.endsWith(k.extension))
- {
- hit = true;
- break;
- }
-
- // Missed extension?
- if (!hit)
- continue;
-
- // Add file
- rv.add(new InputHostFileObject(f));
- }
-
- // Return
- return rv;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public void setLocation(JavaFileManager.Location __a, Iterable
- extends File> __b)
- throws IOException
- {
- // Ignore any location setting as all locations are completely
- // internal
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostFileObject.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostFileObject.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/HostFileObject.java
+++ /dev/null
@@ -1,185 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.NestingKind;
-import javax.tools.JavaFileObject;
-
-/**
- * This is the base for file objects.
- *
- * @since 2017/11/29
- */
-public abstract class HostFileObject
- implements JavaFileObject
-{
- /** The name of the file. */
- protected final String name;
-
- /**
- * Initializes the base file object.
- *
- * @param __name The name of the file.
- * @throws NullPointerException On null arguments.
- * @since 2017/11/29
- */
- public HostFileObject(String __name)
- throws NullPointerException
- {
- if (__name == null)
- throw new NullPointerException("NARG");
-
- this.name = __name;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final boolean delete()
- {
- // Unsupported
- return false;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final Modifier getAccessLevel()
- {
- // Unknown
- return null;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final JavaFileObject.Kind getKind()
- {
- // Depends on the extension
- String name = this.name;
-
- // Java source code
- if (name.endsWith(".java"))
- return JavaFileObject.Kind.SOURCE;
-
- // Java class file
- else if (name.endsWith(".class"))
- return JavaFileObject.Kind.CLASS;
-
- // HTML
- else if (name.endsWith(".htm") || name.endsWith(".html"))
- return JavaFileObject.Kind.HTML;
-
- // Unknoen
- return JavaFileObject.Kind.OTHER;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final long getLastModified()
- {
- // Unsupported
- return Long.MIN_VALUE;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final String getName()
- {
- return this.name;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final NestingKind getNestingKind()
- {
- // Unknown
- return null;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final boolean isNameCompatible(String __sn,
- JavaFileObject.Kind __k)
- {
- // Get name
- String name = this.name;
-
- // Does not match extension?
- if (!name.endsWith(__k.extension))
- return false;
-
- // Only consider anything after the last slash
- int ls = name.lastIndexOf('/');
- if (ls > 0)
- name = name.substring(ls + 1);
-
- // And remove the extension
- int ld = name.lastIndexOf('.');
- if (ld > 0)
- name = name.substring(0, ld);
-
- // Compare base
- return name.equals(__sn);
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/01/22
- */
- @Override
- public final String toString()
- {
- return this.name;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public final URI toUri()
- {
- // Can fail, but it should not
- try
- {
- return new URI("squirreljme", this.name, null);
- }
-
- // {@squirreljme.error BM06 Could not create a URI for the file.}
- catch (URISyntaxException e)
- {
- throw new RuntimeException("BM06", e);
- }
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/InputHostFileObject.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/InputHostFileObject.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/InputHostFileObject.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import net.multiphasicapps.javac.CompilerInput;
-
-/**
- * This is a file object which is used for input.
- *
- * @since 2017/11/29
- */
-public class InputHostFileObject
- extends HostFileObject
-{
- /** The file to source input from. */
- protected final CompilerInput input;
-
- /**
- * Initializes the file object for input.
- *
- * @param __i The stream for input of classes and sources.
- * @throws NullPointerException On null arguments.
- * @since 2017/11/29
- */
- public InputHostFileObject(CompilerInput __i)
- throws NullPointerException
- {
- super(__i.fileName());
-
- if (__i == null)
- throw new NullPointerException("NARG");
-
- this.input = __i;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public CharSequence getCharContent(boolean __a)
- throws IOException
- {
- // Read in all the characters
- StringBuilder sb = new StringBuilder();
- try (Reader r = new InputStreamReader(openInputStream(), "utf-8"))
- {
- char[] buf = new char[2048];
- for (;;)
- {
- int rc = r.read(buf);
-
- // EOF?
- if (rc < 0)
- break;
-
- // Write
- sb.append(buf, 0, rc);
- }
- }
-
- // Return it
- return sb;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public InputStream openInputStream()
- throws IOException
- {
- return this.input.open();
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public OutputStream openOutputStream()
- throws IOException
- {
- // {@squirreljme.error BM07 Attempted to open input file as output.}
- throw new IllegalStateException("BM07");
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Reader openReader(boolean __a)
- throws IOException
- {
- return new InputStreamReader(openInputStream(), "utf-8");
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Writer openWriter()
- throws IOException
- {
- // {@squirreljme.error BM08 Cannot open a writer for an input file.}
- throw new IllegalStateException("BM08");
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/OutputHostFileObject.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/OutputHostFileObject.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/OutputHostFileObject.java
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.builder.javase.javac;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.Writer;
-import net.multiphasicapps.javac.CompilerOutput;
-
-/**
- * This is a file object which is used for output.
- *
- * @since 2017/11/29
- */
-public class OutputHostFileObject
- extends HostFileObject
-{
- /** The output to write to. */
- protected final CompilerOutput output;
-
- /**
- * Initializes the file output.
- *
- * @param __out The output to write to.
- * @param __name The output file name.
- * @throws NullPointerException On null arguments.
- * @since 2017/11/29
- */
- public OutputHostFileObject(CompilerOutput __out, String __name)
- throws NullPointerException
- {
- super(__name);
-
- if (__out == null)
- throw new NullPointerException("NARG");
-
- this.output = __out;
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public CharSequence getCharContent(boolean __a)
- throws IOException
- {
- // {@squirreljme.error BM09 Cannot get character content for an output
- // file.}
- throw new IllegalStateException("BM09");
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public InputStream openInputStream()
- throws IOException
- {
- // {@squirreljme.error BM0a Cannot open an input stream for an output
- // file.}
- throw new IllegalStateException("BM0a");
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public OutputStream openOutputStream()
- throws IOException
- {
- return this.output.output(this.name);
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Reader openReader(boolean __a)
- throws IOException
- {
- // {@squirreljme.error BM0b Cannot open a reader for an output
- // file.}
- throw new IllegalStateException("BM0b");
- }
-
- /**
- * {@inheritDoc}
- * @since 2017/11/29
- */
- @Override
- public Writer openWriter()
- throws IOException
- {
- return new OutputStreamWriter(this.openOutputStream(), "utf-8");
- }
-}
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/package-info.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/package-info.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/javac/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-/**
- * This package contains the support for the host Java compiler to run on
- * existing Java SE systems.
- *
- * @since 2017/11/28
- */
-
-package cc.squirreljme.builder.javase.javac;
-
DELETED bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/package-info.java
Index: bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/package-info.java
==================================================================
--- bldt/javase/libs/builder-implementation/cc/squirreljme/builder/javase/package-info.java
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// Copyright (C) Multi-Phasic Applications
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-/**
- * This package contains the support for Java SE based systems.
- *
- * @since 2017/11/09
- */
-
-package cc.squirreljme.builder.javase;
-
DELETED bldt/javase/libs/javase-runtime/META-INF/MANIFEST.MF
Index: bldt/javase/libs/javase-runtime/META-INF/MANIFEST.MF
==================================================================
--- bldt/javase/libs/javase-runtime/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-X-SquirrelJME-UUID: d354b1ef-6941-4a0a-a20a-cec1191e995f
-X-SquirrelJME-Error: AF
-X-SquirrelJME-Name: Java SE Run-Time
-X-SquirrelJME-Vendor: Stephanie Gawroriski
-X-SquirrelJME-Version: 0.3.0
-X-SquirrelJME-Description: This project contains the support for using
- SquirrelJME as a pseudo-runtime in Java SE, which is needed to run
- programs such as the build environment.
-X-SquirrelJME-Depends: midp-lcdui meep-swm io gcf
-Microedition-Configuration: CLDC-1.8-Compact
-
DELETED bldt/javase/libs/javase-runtime/META-INF/services/cc.squirreljme.runtime.gcf.IPConnectionFactory
Index: bldt/javase/libs/javase-runtime/META-INF/services/cc.squirreljme.runtime.gcf.IPConnectionFactory
==================================================================
--- bldt/javase/libs/javase-runtime/META-INF/services/cc.squirreljme.runtime.gcf.IPConnectionFactory
+++ /dev/null
@@ -1,1 +0,0 @@
-cc.squirreljme.runtime.javase.JavaSEIPConnectionFactory
DELETED bldt/javase/libs/javase-runtime/cc/squirreljme/jvm/Assembly.java
Index: bldt/javase/libs/javase-runtime/cc/squirreljme/jvm/Assembly.java
==================================================================
--- bldt/javase/libs/javase-runtime/cc/squirreljme/jvm/Assembly.java
+++ /dev/null
@@ -1,2171 +0,0 @@
-// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
-// ---------------------------------------------------------------------------
-// Multi-Phasic Applications: SquirrelJME
-// Copyright (C) Stephanie Gawroriski
-// ---------------------------------------------------------------------------
-// SquirrelJME is under the GNU General Public License v3+, or later.
-// See license.mkd for licensing and copyright information.
-// ---------------------------------------------------------------------------
-
-package cc.squirreljme.jvm;
-
-import cc.squirreljme.runtime.cldc.lang.ApiLevel;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.IdentityHashMap;
-import java.util.Map;
-
-/**
- * This class is used special by the compiler to transform all the various
- * operations into regular instructions rather than method calls.
- *
- * The compiler will take all of the method arguments and instead use their
- * inputs and outputs from the values of registers instead. However due to
- * this, this means that these instructions are purely primitive in that
- * they must not depend on any aspect of the virtual machine.
- *
- * @since 2019/04/20
- */
-public final class Assembly
-{
- /** Extra call stack depth. */
- private static final int _EXTRA_STACK_DEPTH =
- 3;
-
- /** Local thread data. */
- private static final ThreadLocal _THREAD_DATA =
- new ThreadLocal<>();
-
- /** Unique string map. */
- private static final Map _STRINGS =
- new HashMap<>();
-
- /** Unique objects. */
- private static final Map