├── settings.gradle
├── app
├── src
│ ├── main
│ │ ├── jni
│ │ │ ├── Android.mk
│ │ │ ├── librs
│ │ │ │ ├── bin
│ │ │ │ │ ├── rs
│ │ │ │ │ ├── fshell
│ │ │ │ │ ├── lssctl
│ │ │ │ │ └── rsc
│ │ │ │ ├── resource
│ │ │ │ │ ├── compiler
│ │ │ │ │ │ ├── cflags
│ │ │ │ │ │ └── rsc.img
│ │ │ │ │ ├── modules
│ │ │ │ │ │ ├── primops.mx
│ │ │ │ │ │ ├── precore.mx
│ │ │ │ │ │ ├── rs_glue.mx
│ │ │ │ │ │ ├── rs_sys_paths.mx
│ │ │ │ │ │ ├── earley.mif
│ │ │ │ │ │ ├── fasl.mif
│ │ │ │ │ │ ├── fasl.mx
│ │ │ │ │ │ ├── hacks.mif
│ │ │ │ │ │ ├── iolib.mif
│ │ │ │ │ │ ├── mlink.mif
│ │ │ │ │ │ ├── objsys.mif
│ │ │ │ │ │ ├── paths.mif
│ │ │ │ │ │ ├── regex.mif
│ │ │ │ │ │ ├── repl.mif
│ │ │ │ │ │ ├── sets.mif
│ │ │ │ │ │ ├── sort.mif
│ │ │ │ │ │ ├── start.mif
│ │ │ │ │ │ ├── tables.mif
│ │ │ │ │ │ ├── ttywin.mif
│ │ │ │ │ │ ├── unixm.mif
│ │ │ │ │ │ ├── calendar.mif
│ │ │ │ │ │ ├── codegen.mif
│ │ │ │ │ │ ├── compiler.mif
│ │ │ │ │ │ ├── corelib.mif
│ │ │ │ │ │ ├── debugger.mif
│ │ │ │ │ │ ├── editinp.mif
│ │ │ │ │ │ ├── imageio.mif
│ │ │ │ │ │ ├── mathlib.mif
│ │ │ │ │ │ ├── precore.mif
│ │ │ │ │ │ ├── primops.mif
│ │ │ │ │ │ ├── rs_glue.mif
│ │ │ │ │ │ ├── rs_lang.mif
│ │ │ │ │ │ ├── syscalls.mif
│ │ │ │ │ │ ├── threads.mif
│ │ │ │ │ │ ├── corelib.mx
│ │ │ │ │ │ ├── high_scheme.mif
│ │ │ │ │ │ ├── low_scheme.mif
│ │ │ │ │ │ ├── rs_db_lss.mif
│ │ │ │ │ │ ├── rs_sys_tables.mx
│ │ │ │ │ │ ├── rs_lang_eval.mif
│ │ │ │ │ │ ├── rs_sys_linker.mif
│ │ │ │ │ │ ├── rs_sys_paths.mif
│ │ │ │ │ │ ├── rs_sys_tables.mif
│ │ │ │ │ │ ├── paths.mx
│ │ │ │ │ │ ├── rs_lang_internal.mif
│ │ │ │ │ │ ├── rs_sys_reflect.mif
│ │ │ │ │ │ ├── objsys.mx
│ │ │ │ │ │ ├── low_scheme.mx
│ │ │ │ │ │ ├── mathlib.mx
│ │ │ │ │ │ ├── rs_sys_threads_shell.mif
│ │ │ │ │ │ ├── rs_sys_threads_manager.mif
│ │ │ │ │ │ ├── sets.mx
│ │ │ │ │ │ ├── earley.mx
│ │ │ │ │ │ ├── tables.mx
│ │ │ │ │ │ ├── rs_db_lss.mx
│ │ │ │ │ │ ├── sort.mx
│ │ │ │ │ │ ├── start.mx
│ │ │ │ │ │ ├── imageio.mx
│ │ │ │ │ │ ├── mlink.mx
│ │ │ │ │ │ ├── regex.mx
│ │ │ │ │ │ ├── threads.mx
│ │ │ │ │ │ ├── compiler.mx
│ │ │ │ │ │ ├── hacks.mx
│ │ │ │ │ │ ├── editinp.mx
│ │ │ │ │ │ ├── iolib.mx
│ │ │ │ │ │ ├── high_scheme.mx
│ │ │ │ │ │ ├── calendar.mx
│ │ │ │ │ │ ├── codegen.mx
│ │ │ │ │ │ ├── ttywin.mx
│ │ │ │ │ │ ├── unixm.mx
│ │ │ │ │ │ ├── repl.mx
│ │ │ │ │ │ ├── rs_lang.mx
│ │ │ │ │ │ ├── syscalls.mx
│ │ │ │ │ │ ├── rs_sys_linker.mx
│ │ │ │ │ │ ├── rs_sys_reflect.mx
│ │ │ │ │ │ ├── rs_lang_internal.mx
│ │ │ │ │ │ ├── debugger.mx
│ │ │ │ │ │ ├── rs_lang_eval.mx
│ │ │ │ │ │ ├── rs_sys_threads_manager.mx
│ │ │ │ │ │ ├── rs_sys_threads_shell.mx
│ │ │ │ │ │ ├── sort.doc
│ │ │ │ │ │ ├── editinp.doc
│ │ │ │ │ │ ├── hacks.doc
│ │ │ │ │ │ ├── threads.doc
│ │ │ │ │ │ ├── high_scheme.doc
│ │ │ │ │ │ ├── earley.doc
│ │ │ │ │ │ └── paths.doc
│ │ │ │ │ ├── system.img
│ │ │ │ │ ├── fshell.orig.fas
│ │ │ │ │ └── buildenv
│ │ │ │ │ │ ├── preamble.mak
│ │ │ │ │ │ └── module.mak
│ │ │ │ ├── lib
│ │ │ │ │ ├── x86
│ │ │ │ │ │ └── librs.a
│ │ │ │ │ └── armeabi
│ │ │ │ │ │ └── librs.a
│ │ │ │ ├── include
│ │ │ │ │ ├── arm
│ │ │ │ │ │ ├── rscheme
│ │ │ │ │ │ │ ├── modulo.h
│ │ │ │ │ │ │ ├── buildsty.h
│ │ │ │ │ │ │ ├── rlseconf.cfg
│ │ │ │ │ │ │ ├── rlseconf.h
│ │ │ │ │ │ │ ├── pkgs
│ │ │ │ │ │ │ │ ├── unixm.h
│ │ │ │ │ │ │ │ └── syscalls.h
│ │ │ │ │ │ │ ├── gcserver2.ci
│ │ │ │ │ │ │ ├── gcxverse.h
│ │ │ │ │ │ │ ├── gcglue.h
│ │ │ │ │ │ │ ├── hasht.h
│ │ │ │ │ │ │ ├── langtype.h
│ │ │ │ │ │ │ ├── record.h
│ │ │ │ │ │ │ ├── stack.ci
│ │ │ │ │ │ │ ├── gcserver1.ci
│ │ │ │ │ │ │ ├── timeprof.h
│ │ │ │ │ │ │ ├── writebar.h
│ │ │ │ │ │ │ ├── rdln.h
│ │ │ │ │ │ │ ├── irc.h
│ │ │ │ │ │ │ ├── dynlink.h
│ │ │ │ │ │ │ ├── runtime.h
│ │ │ │ │ │ │ ├── rsmodule.h
│ │ │ │ │ │ │ ├── travstat.h
│ │ │ │ │ │ │ ├── clientyp.h
│ │ │ │ │ │ │ ├── heapi.h
│ │ │ │ │ │ │ ├── gcconfig.h
│ │ │ │ │ │ │ ├── stdmodul.h
│ │ │ │ │ │ │ ├── stack.h
│ │ │ │ │ │ │ ├── ntohd.ci
│ │ │ │ │ │ │ ├── gcadapt.h
│ │ │ │ │ │ │ ├── alloc.h
│ │ │ │ │ │ │ ├── allocns.h
│ │ │ │ │ │ │ ├── traverse.h
│ │ │ │ │ │ │ ├── hashmain.h
│ │ │ │ │ │ │ ├── chektype.ci
│ │ │ │ │ │ │ ├── hashfn.h
│ │ │ │ │ │ │ ├── stdiox.h
│ │ │ │ │ │ │ ├── bcextend.h
│ │ │ │ │ │ │ ├── stakcach.h
│ │ │ │ │ │ │ ├── stakcach.ci
│ │ │ │ │ │ │ ├── sizeclas.h
│ │ │ │ │ │ │ ├── vinsns.ci
│ │ │ │ │ │ │ ├── chektype.h
│ │ │ │ │ │ │ ├── intrs.h
│ │ │ │ │ │ │ ├── imagfile.h
│ │ │ │ │ │ │ ├── gcserver.h
│ │ │ │ │ │ │ ├── gcclient2.ci
│ │ │ │ │ │ │ └── longint.h
│ │ │ │ │ │ └── rscheme.h
│ │ │ │ │ └── x86
│ │ │ │ │ │ ├── rscheme
│ │ │ │ │ │ ├── modulo.h
│ │ │ │ │ │ ├── buildsty.h
│ │ │ │ │ │ ├── rlseconf.cfg
│ │ │ │ │ │ ├── rlseconf.h
│ │ │ │ │ │ ├── pkgs
│ │ │ │ │ │ │ ├── unixm.h
│ │ │ │ │ │ │ └── syscalls.h
│ │ │ │ │ │ ├── gcserver2.ci
│ │ │ │ │ │ ├── gcxverse.h
│ │ │ │ │ │ ├── gcglue.h
│ │ │ │ │ │ ├── hasht.h
│ │ │ │ │ │ ├── langtype.h
│ │ │ │ │ │ ├── record.h
│ │ │ │ │ │ ├── stack.ci
│ │ │ │ │ │ ├── gcserver1.ci
│ │ │ │ │ │ ├── timeprof.h
│ │ │ │ │ │ ├── writebar.h
│ │ │ │ │ │ ├── rdln.h
│ │ │ │ │ │ ├── irc.h
│ │ │ │ │ │ ├── dynlink.h
│ │ │ │ │ │ ├── runtime.h
│ │ │ │ │ │ ├── rsmodule.h
│ │ │ │ │ │ ├── travstat.h
│ │ │ │ │ │ ├── clientyp.h
│ │ │ │ │ │ ├── heapi.h
│ │ │ │ │ │ ├── gcconfig.h
│ │ │ │ │ │ ├── stdmodul.h
│ │ │ │ │ │ ├── stack.h
│ │ │ │ │ │ ├── ntohd.ci
│ │ │ │ │ │ ├── gcadapt.h
│ │ │ │ │ │ ├── alloc.h
│ │ │ │ │ │ ├── allocns.h
│ │ │ │ │ │ ├── traverse.h
│ │ │ │ │ │ ├── hashmain.h
│ │ │ │ │ │ ├── chektype.ci
│ │ │ │ │ │ ├── hashfn.h
│ │ │ │ │ │ ├── stdiox.h
│ │ │ │ │ │ ├── bcextend.h
│ │ │ │ │ │ ├── stakcach.h
│ │ │ │ │ │ ├── stakcach.ci
│ │ │ │ │ │ ├── sizeclas.h
│ │ │ │ │ │ ├── vinsns.ci
│ │ │ │ │ │ ├── chektype.h
│ │ │ │ │ │ ├── intrs.h
│ │ │ │ │ │ ├── imagfile.h
│ │ │ │ │ │ ├── gcserver.h
│ │ │ │ │ │ └── gcclient2.ci
│ │ │ │ │ │ └── rscheme.h
│ │ │ │ └── Android.mk
│ │ │ ├── Application.mk
│ │ │ └── rscheme
│ │ │ │ ├── Android.mk
│ │ │ │ ├── main.h
│ │ │ │ └── org_evilbinary_rs_Rs.h
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── layout
│ │ │ │ └── activity_main.xml
│ │ ├── assets
│ │ │ └── sys.img.zip
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── org
│ │ │ └── evilbinary
│ │ │ └── rs
│ │ │ ├── Rs.java
│ │ │ └── MainActivity.java
│ ├── test
│ │ └── java
│ │ │ └── lisp
│ │ │ └── evilbinary
│ │ │ └── org
│ │ │ └── rscheme
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── org
│ │ └── evilbinary
│ │ └── rs
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── README.md
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── local.properties
├── gradle.properties
├── RScheme.iml
├── LICENSE
└── gradlew.bat
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | include $(call all-subdir-makefiles)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Rscheme
2 | RScheme for android 。运行在android上的scheme。
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | RScheme
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/bin/rs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/bin/rs
--------------------------------------------------------------------------------
/app/src/main/assets/sys.img.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/assets/sys.img.zip
--------------------------------------------------------------------------------
/app/src/main/jni/librs/bin/fshell:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/bin/fshell
--------------------------------------------------------------------------------
/app/src/main/jni/librs/bin/lssctl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/bin/lssctl
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/compiler/cflags:
--------------------------------------------------------------------------------
1 | -DANDROID -g -O -DNDEBUG -DINLINES -DGC_MACROS -Wall -Wno-unused -I. -I../install/include
2 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/primops.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (primops "primops" () () () ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/lib/x86/librs.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/lib/x86/librs.a
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/modulo.h:
--------------------------------------------------------------------------------
1 | #define REMDR(x,y) ((x)%(y))
2 | #define MOD(x,y) (((x)%(y))+((x)<0?((y)<0?0:y):((y)<0?y:0)))
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/modulo.h:
--------------------------------------------------------------------------------
1 | #define REMDR(x,y) ((x)%(y))
2 | #define MOD(x,y) (((x)%(y))+((x)<0?((y)<0?0:y):((y)<0?y:0)))
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/lib/armeabi/librs.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/lib/armeabi/librs.a
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/system.img:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/system.img
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/jni/Application.mk:
--------------------------------------------------------------------------------
1 | APP_ABI := armeabi armeabi-v7a x86
2 | #APP_STL := gnustl_static
3 | #APP_STL := stlport_static
4 | #NDK_TOOLCHAIN_VERSION = 4.8
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/fshell.orig.fas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/fshell.orig.fas
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/precore.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (precore "precore" () () (*scheme* primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_glue.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.glue "rs_glue" () () (corelib *scheme*) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_paths.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.sys.paths "rs_sys_paths" () () (paths) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/compiler/rsc.img:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/compiler/rsc.img
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/earley.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/earley.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/fasl.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/fasl.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/fasl.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (fasl "fasl" ("fasl") () (*scheme* corelib primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/hacks.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/hacks.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/iolib.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/iolib.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/mlink.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/mlink.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/objsys.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/objsys.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/paths.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/paths.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/regex.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/regex.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/repl.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/repl.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/sets.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/sets.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/sort.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/sort.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/start.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/start.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/tables.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/tables.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/ttywin.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/ttywin.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/unixm.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/unixm.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/calendar.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/calendar.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/codegen.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/codegen.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/compiler.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/compiler.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/corelib.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/corelib.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/debugger.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/debugger.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/editinp.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/editinp.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/imageio.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/imageio.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/mathlib.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/mathlib.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/precore.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/precore.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/primops.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/primops.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_glue.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_glue.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_lang.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_lang.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/syscalls.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/syscalls.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/threads.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/threads.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/corelib.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (corelib "corelib" ("corelib") () (precore *scheme* primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/high_scheme.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/high_scheme.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/low_scheme.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/low_scheme.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_db_lss.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_db_lss.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_tables.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.sys.tables "rs_sys_tables" () () (tables corelib) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_lang_eval.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_lang_eval.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_linker.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_sys_linker.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_paths.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_sys_paths.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_tables.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_sys_tables.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/paths.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (paths "paths" () () (corelib low-scheme objsys *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_lang_internal.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_lang_internal.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_reflect.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_sys_reflect.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/objsys.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (objsys "objsys" ("objsys") () (corelib low-scheme *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/low_scheme.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (low-scheme "low_scheme" ("low_scheme") () (*scheme* corelib primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/mathlib.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (mathlib "mathlib" ("mathlib") () (*scheme* corelib primops low-scheme precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_threads_shell.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_sys_threads_shell.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_threads_manager.mif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evilbinary/RScheme-for-android/master/app/src/main/jni/librs/resource/modules/rs_sys_threads_manager.mif
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/sets.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (sets "sets" () () (tables high-scheme *scheme* corelib primops iolib low-scheme mathlib) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/earley.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (earley "earley" () () (corelib mathlib objsys low-scheme tables *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/tables.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (tables "tables" ("tables") () (mathlib corelib objsys low-scheme *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_db_lss.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.db.lss "rs_db_lss" ("rs_db_lss") () (rs.glue rs.lang corelib primops precore *scheme*) ("lss" "z"))
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/sort.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (sort "sort" ("sort") () (corelib high-scheme mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/start.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (start "start" () () (corelib high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/imageio.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (imageio "imageio" ("imageio") () (sort corelib tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/mlink.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (mlink "mlink" () () (paths corelib high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/regex.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (regex "regex" ("regex") () (tables corelib high-scheme mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/threads.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (threads "threads" () () (corelib high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/compiler.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (compiler "compiler" ("compiler") () (mlink corelib tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/hacks.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (hacks "hacks" () () (paths repl mlink codegen corelib tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/editinp.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (editinp "editinp" ("editinp") () (corelib high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/iolib.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (iolib "iolib" ("iolib") ((10 "stdio")) (earley paths corelib mathlib objsys low-scheme tables *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/high_scheme.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (high-scheme "high_scheme" ("high_scheme") () (tables corelib mathlib iolib low-scheme objsys *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/calendar.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (calendar "calendar" () () (syscalls tables regex high-scheme objsys *scheme* corelib primops iolib low-scheme mathlib precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/codegen.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (codegen "codegen" ("codegen") () (mlink corelib compiler paths tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/ttywin.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (ttywin "ttywin" ("ttywin") ((81 "curses")) (high-scheme tables objsys *scheme* primops corelib iolib low-scheme mathlib start precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/buildsty.h:
--------------------------------------------------------------------------------
1 | /* build style parameters */
2 | #define RECORD_CALL_CHAIN
3 | #define STACK_CACHE
4 | #define _rs_inline inline
5 | #define _rs_volatile __attribute__((noreturn))
6 | #define PLATFORM_TYPE "android"
7 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/buildsty.h:
--------------------------------------------------------------------------------
1 | /* build style parameters */
2 | #define RECORD_CALL_CHAIN
3 | #define STACK_CACHE
4 | #define _rs_inline inline
5 | #define _rs_volatile __attribute__((noreturn))
6 | #define PLATFORM_TYPE "android"
7 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/unixm.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (unixm "unixm" ("unixm") () (corelib syscalls start mlink paths high-scheme tables mathlib iolib objsys low-scheme *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Mobile Tools for Java (J2ME)
4 | .mtj.tmp/
5 |
6 | # Package Files #
7 | *.jar
8 | *.war
9 | *.ear
10 |
11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12 | hs_err_pid*
13 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/rlseconf.cfg:
--------------------------------------------------------------------------------
1 | #ifndef _H_RSCHEME_RLSECONF
2 | #define _H_RSCHEME_RLSECONF
3 |
4 | #define RSCHEME_VERSION "0.7.3.4-b7u"
5 | #define RSCHEME_BUILD "v0.7.3.4-b7u, 2007-05-30"
6 | #endif /* _H_RSCHEME_RLSECONF */
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/rlseconf.h:
--------------------------------------------------------------------------------
1 | #ifndef _H_RSCHEME_RLSECONF
2 | #define _H_RSCHEME_RLSECONF
3 |
4 | #define RSCHEME_VERSION "0.7.3.4-b7u"
5 | #define RSCHEME_BUILD "v0.7.3.4-b7u, 2007-05-30"
6 | #endif /* _H_RSCHEME_RLSECONF */
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/rlseconf.cfg:
--------------------------------------------------------------------------------
1 | #ifndef _H_RSCHEME_RLSECONF
2 | #define _H_RSCHEME_RLSECONF
3 |
4 | #define RSCHEME_VERSION "0.7.3.4-b7u"
5 | #define RSCHEME_BUILD "v0.7.3.4-b7u, 2007-05-30"
6 | #endif /* _H_RSCHEME_RLSECONF */
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/rlseconf.h:
--------------------------------------------------------------------------------
1 | #ifndef _H_RSCHEME_RLSECONF
2 | #define _H_RSCHEME_RLSECONF
3 |
4 | #define RSCHEME_VERSION "0.7.3.4-b7u"
5 | #define RSCHEME_BUILD "v0.7.3.4-b7u, 2007-05-30"
6 | #endif /* _H_RSCHEME_RLSECONF */
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/repl.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (repl "repl" () () (corelib sort start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_lang.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.lang "rs_lang" () () (corelib sort start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/syscalls.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (syscalls "syscalls" ("syscalls") ((11 "sysio")) (regex corelib start mlink paths high-scheme tables mathlib iolib objsys low-scheme *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_linker.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.sys.linker "rs_sys_linker" () () (corelib sort start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_reflect.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.sys.reflect "rs_sys_reflect" () () (corelib sort start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_lang_internal.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.lang.internal "rs_lang_internal" () () (corelib sort start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/debugger.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (debugger "debugger" () () (hacks regex repl sort corelib start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_lang_eval.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.lang.eval "rs_lang_eval" () () (repl corelib sort start mlink paths editinp codegen compiler high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 21 11:34:03 PDT 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_threads_manager.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.sys.threads.manager "rs_sys_threads_manager" ("rs_sys_threads_manager") () (regex debugger unixm sort syscalls corelib start mlink paths high-scheme tables mathlib iolib objsys low-scheme *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/rs_sys_threads_shell.mx:
--------------------------------------------------------------------------------
1 | ;mx2 -- RScheme Module indeX (MX) file -*-Scheme-*-
2 | (rs.sys.threads.shell "rs_sys_threads_shell" () () (tables syscalls rs.sys.threads.manager debugger sort editinp repl syscalls corelib start mlink paths high-scheme tables mathlib iolib objsys low-scheme *scheme* primops precore) ())
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/sort.doc:
--------------------------------------------------------------------------------
1 | (sort (corelib high-scheme mathlib objsys low-scheme iolib *scheme* primops precore) (vector-sort! sort) (("modules/sort/sort.scm" function sort:heap-sort-1 ()) ("modules/sort/sort.scm" function sort:heap-sort->list ()) ("modules/sort/sort.scm" function sort:heap-sort->vector ()) ("modules/sort/sort.scm" function vector-sort! ()) ("modules/sort/sort.scm" function sort ())))
--------------------------------------------------------------------------------
/app/src/test/java/lisp/evilbinary/org/rscheme/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package lisp.evilbinary.org.rscheme;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/org/evilbinary/rs/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package org.evilbinary.rs;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/buildenv/preamble.mak:
--------------------------------------------------------------------------------
1 | # This is the preamble.mak used when building packages and other addons
2 | # INSTALL_DIR=/data/data/org.evilbinary.cl/system/rs
3 | IFLAGS=$(USR_IFLAGS) -I. $(SYS_IFLAGS) -I$(INSTALL_DIR)/include
4 | SUBPROJ_LD=ld
5 | SUBPROJ_LD_FLAGS=-r
6 | LDX_FLAGS=-L$(INSTALL_DIR)/lib -lrs -rdynamic -lm -ldl
7 | CC=gcc
8 | CFLAGS1=-DANDROID -g -O -DNDEBUG -DINLINES -DGC_MACROS -Wall -Wno-unused
9 | CFLAGS=$(CFLAGS1) $(XCFLAGS) $(IFLAGS)
10 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/bin/rsc:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if test "$1" = "-abt"
4 | then abt=-abt
5 | shift
6 | else abt=""
7 | fi
8 |
9 | case "$1" in
10 | -precore) cb=start ; shift ;;
11 | -corelib) cb=+precore ; shift ;;
12 | -lowscm) cb=+core ; shift ;;
13 | *) cb=+low ;;
14 | esac
15 |
16 | exec /data/data/org.evilbinary.cl/system/rs/bin/rs -q $abt -image /data/data/org.evilbinary.cl/system/rs/resource/compiler/rsc.img \
17 | -BC /data/data/org.evilbinary.cl/system/rs/resource/compiler/bytecode/bcgen.scm \
18 | -config-basis $cb "$@"
19 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file should *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/Users/evil/Applications/adt-bundle-mac-x86_64-20140702/sdk
11 | ndk.dir=/Users/evil/Applications/android-ndk-r10
12 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/pkgs/unixm.h:
--------------------------------------------------------------------------------
1 | /**********************************************
2 | THIS FILE WAS AUTOMATICALLY GENERATED, AND MAY
3 | BE AUTOMATICALLY RE-GENERATED WHEN THE COMPILER
4 | OR SOURCE CHANGES. DO NOT MODIFY THIS FILE BY HAND!
5 | RScheme Build (v0.7.3.4-b7u, 2007-05-30)
6 | **********************************************/
7 |
8 |
9 | #ifndef _H_UNIXM
10 | #define _H_UNIXM
11 |
12 | /****************** Public Interface for Module `unixm' ******************/
13 | #include
14 | extern struct module_descr module_unixm;
15 | #endif /* _H_UNIXM */
16 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/pkgs/unixm.h:
--------------------------------------------------------------------------------
1 | /**********************************************
2 | THIS FILE WAS AUTOMATICALLY GENERATED, AND MAY
3 | BE AUTOMATICALLY RE-GENERATED WHEN THE COMPILER
4 | OR SOURCE CHANGES. DO NOT MODIFY THIS FILE BY HAND!
5 | RScheme Build (v0.7.3.4-b7u, 2007-05-30)
6 | **********************************************/
7 |
8 |
9 | #ifndef _H_UNIXM
10 | #define _H_UNIXM
11 |
12 | /****************** Public Interface for Module `unixm' ******************/
13 | #include
14 | extern struct module_descr module_unixm;
15 | #endif /* _H_UNIXM */
16 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/pkgs/syscalls.h:
--------------------------------------------------------------------------------
1 | /**********************************************
2 | THIS FILE WAS AUTOMATICALLY GENERATED, AND MAY
3 | BE AUTOMATICALLY RE-GENERATED WHEN THE COMPILER
4 | OR SOURCE CHANGES. DO NOT MODIFY THIS FILE BY HAND!
5 | RScheme Build (v0.7.3.4-b7u, 2007-05-30)
6 | **********************************************/
7 |
8 |
9 | #ifndef _H_SYSCALLS
10 | #define _H_SYSCALLS
11 |
12 | /***************** Public Interface for Module `syscalls' *****************/
13 | #include
14 | extern struct module_descr module_syscalls;
15 | #endif /* _H_SYSCALLS */
16 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/pkgs/syscalls.h:
--------------------------------------------------------------------------------
1 | /**********************************************
2 | THIS FILE WAS AUTOMATICALLY GENERATED, AND MAY
3 | BE AUTOMATICALLY RE-GENERATED WHEN THE COMPILER
4 | OR SOURCE CHANGES. DO NOT MODIFY THIS FILE BY HAND!
5 | RScheme Build (v0.7.3.4-b7u, 2007-05-30)
6 | **********************************************/
7 |
8 |
9 | #ifndef _H_SYSCALLS
10 | #define _H_SYSCALLS
11 |
12 | /***************** Public Interface for Module `syscalls' *****************/
13 | #include
14 | extern struct module_descr module_syscalls;
15 | #endif /* _H_SYSCALLS */
16 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcserver2.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcserver2.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:52
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | /* empty for now */
15 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcserver2.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcserver2.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:52
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | /* empty for now */
15 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcxverse.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcxverse.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcxverse.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcxverse.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/jni/rscheme/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | ifeq ($(TARGET_ARCH),x86)
6 | PLATFORM := androidx86
7 | else
8 | PLATFORM := android
9 | endif
10 |
11 | RSCHEME_HOME := $(LOCAL_PATH)/../librs
12 |
13 | LOCAL_MODULE := myrs
14 | #LOCAL_PATH := $(LOCAL_PATH)
15 | LOCAL_SRC_FILES := main.c
16 | LOCAL_CFLAGS += -I$(RSCHEME_HOME)/include/$(TARGET_ARCH)
17 | LOCAL_CFLAGS += -g -Wall -DANDROID -O -DINLINES -DGC_MACROS
18 | LOCAL_LDLIBS := -lz
19 | LOCAL_LDLIBS += -llog
20 | LOCAL_STATIC_LIBRARIES := librs #libpackages liblss
21 | #LOCAL_SHARED_LIBRARIES :=
22 | include $(BUILD_SHARED_LIBRARY)
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcglue.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcglue.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | extern IRC_Heap *gc_arena;
15 |
16 | #include
17 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcglue.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcglue.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | extern IRC_Heap *gc_arena;
15 |
16 | #include
17 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/hasht.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/hasht/hasht.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:44
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HASHT
15 | #define _H_HASHT
16 |
17 | #include
18 |
19 | #endif /* _H_HASHT */
20 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/hasht.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/hasht/hasht.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:44
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HASHT
15 | #define _H_HASHT
16 |
17 | #include
18 |
19 | #endif /* _H_HASHT */
20 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/evil/Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/langtype.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gcadapt/irc/langtype.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:45
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_LANGTYPE
15 | #define _H_LANGTYPE
16 |
17 | #include
18 |
19 | typedef obj *pos_ptr_addr;
20 | typedef obj *lang_weak_ptr_addr;
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/langtype.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gcadapt/irc/langtype.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:45
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_LANGTYPE
15 | #define _H_LANGTYPE
16 |
17 | #include
18 |
19 | typedef obj *pos_ptr_addr;
20 | typedef obj *lang_weak_ptr_addr;
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/record.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/record.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #define NUM_GENS (3)
15 | #define NUM_SIZES (10)
16 | #define NUM_COLORS (4)
17 |
18 | typedef struct _DataRecord {
19 | unsigned short count[NUM_GENS][NUM_SIZES][NUM_COLORS];
20 | } DataRecord;
21 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/record.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/record.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #define NUM_GENS (3)
15 | #define NUM_SIZES (10)
16 | #define NUM_COLORS (4)
17 |
18 | typedef struct _DataRecord {
19 | unsigned short count[NUM_GENS][NUM_SIZES][NUM_COLORS];
20 | } DataRecord;
21 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/stack.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stack.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | CI_DECL bool in_stack_cache( obj value )
15 | {
16 | return NO;
17 | }
18 |
19 | CI_DECL void flush_stack_cache( void )
20 | {
21 | }
22 |
23 |
24 | CI_DECL void init_stack_cache( void )
25 | {
26 | }
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/stack.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stack.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | CI_DECL bool in_stack_cache( obj value )
15 | {
16 | return NO;
17 | }
18 |
19 | CI_DECL void flush_stack_cache( void )
20 | {
21 | }
22 |
23 |
24 | CI_DECL void init_stack_cache( void )
25 | {
26 | }
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/install/include/rscheme.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:48
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_RSCHEME
15 | #define _H_RSCHEME
16 |
17 | /* platform-independence layer */
18 |
19 | #include
20 | #include
21 |
22 | #include "rscheme"
23 | #include "rscheme"
24 | #include "rscheme"
25 |
26 | #endif /* _H_RSCHEME */
27 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcserver1.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcserver1.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:52
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include
15 |
16 | CI_DECL void gc_safe_point( UINT_32 size )
17 | {
18 | if (gc_alloc_time < 0)
19 | {
20 | if (rsprof_active)
21 | rsprof_gc_work();
22 | gc_alloc_time = IRC_safePoint( gc_arena );
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcserver1.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcserver1.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:52
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include
15 |
16 | CI_DECL void gc_safe_point( UINT_32 size )
17 | {
18 | if (gc_alloc_time < 0)
19 | {
20 | if (rsprof_active)
21 | rsprof_gc_work();
22 | gc_alloc_time = IRC_safePoint( gc_arena );
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/install/include/rscheme.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:48
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_RSCHEME
15 | #define _H_RSCHEME
16 |
17 | /* platform-independence layer */
18 |
19 | #include
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #endif /* _H_RSCHEME */
27 |
--------------------------------------------------------------------------------
/app/src/main/jni/rscheme/main.h:
--------------------------------------------------------------------------------
1 | /**
2 | * 作者:evilbinary on 4/16/16.
3 | * 邮箱:rootdebug@163.com
4 | */
5 |
6 | #ifndef RSCHEME_MAIN_H
7 | #define RSCHEME_MAIN_H
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | //#include
16 | //#include
17 | //#include
18 | //#include
19 | //#include
20 |
21 | #include
22 | #include
23 | #include
24 | #include
25 | void rs_init( int argc, const char **argv );
26 | obj rs_eval(char *str);
27 |
28 | char* jstringTostring(JNIEnv* env, jstring jstr);
29 | jstring strToJstring(JNIEnv* env, const char* pat) ;
30 |
31 | #endif //RSCHEME_MAIN_H
32 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/timeprof.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/timeprof.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.2
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_RS_TIMEPOINT
15 | #define _H_RS_TIMEPOINT
16 |
17 | #ifdef TIMEPOINT
18 | void timepoint( int id );
19 | #else
20 | #define timepoint(id) do {} while (0)
21 | #endif
22 |
23 | void start_timepoints( unsigned cap );
24 | void flush_timepoints( const char *file );
25 |
26 | #endif /* _H_RS_TIMEPOINT */
27 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/timeprof.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/timeprof.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.2
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_RS_TIMEPOINT
15 | #define _H_RS_TIMEPOINT
16 |
17 | #ifdef TIMEPOINT
18 | void timepoint( int id );
19 | #else
20 | #define timepoint(id) do {} while (0)
21 | #endif
22 |
23 | void start_timepoints( unsigned cap );
24 | void flush_timepoints( const char *file );
25 |
26 | #endif /* _H_RS_TIMEPOINT */
27 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/writebar.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/writebar.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.5
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #define WB_NONE (0) /* write is safe */
15 | #define WB_COLOR (1) /* could violate color invariant */
16 | #define WB_GENERATION (2) /* could violate generation invariant */
17 | #define WB_GLOBAL (3) /* writing into a global object */
18 | #define WB_PERSISTENT (4) /* writing into a persistent object */
19 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/writebar.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/writebar.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.5
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #define WB_NONE (0) /* write is safe */
15 | #define WB_COLOR (1) /* could violate color invariant */
16 | #define WB_GENERATION (2) /* could violate generation invariant */
17 | #define WB_GLOBAL (3) /* writing into a global object */
18 | #define WB_PERSISTENT (4) /* writing into a persistent object */
19 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/Android.mk:
--------------------------------------------------------------------------------
1 | BASE_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | RSCHEME_HOME := $(BASE_PATH)
6 |
7 | ifeq ($(TARGET_ARCH),x86)
8 | PLATFORM := androidx86
9 | include $(CLEAR_VARS)
10 | LOCAL_MODULE := librs
11 | LOCAL_SRC_FILES := $(RSCHEME_HOME)/lib/x86/librs.a
12 | include $(PREBUILT_STATIC_LIBRARY)
13 | else
14 | PLATFORM := android
15 | include $(CLEAR_VARS)
16 | LOCAL_MODULE := librs
17 | LOCAL_SRC_FILES := $(RSCHEME_HOME)/lib/armeabi/librs.a
18 | include $(PREBUILT_STATIC_LIBRARY)
19 |
20 | endif
21 |
22 |
23 |
24 | #include $(CLEAR_VARS)
25 | #LOCAL_MODULE := liblss
26 | #LOCAL_SRC_FILES := $(RSCHEME_HOME)/lib/liblss.a
27 | #include $(PREBUILT_STATIC_LIBRARY)
28 | #
29 | #include $(CLEAR_VARS)
30 | #LOCAL_MODULE := libpackages
31 | #LOCAL_SRC_FILES := $(RSCHEME_HOME)/lib/libpackages.a
32 | ##LOCAL_STATIC_LIBRARIES := $(RSCHEME_HOME)/lib/liblss.a
33 | #include $(PREBUILT_STATIC_LIBRARY)
34 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/rdln.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/rdln.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: define the interface to the rdln subsystem
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_RSEDITINP_RDLN
16 | #define _H_RSEDITINP_RDLN
17 |
18 | #include
19 |
20 | rs_bool rdln_isa_tty( void );
21 | rs_bool rdln_enabled( void );
22 | void rdln_add_history( obj str );
23 | obj read_console_line( obj completions_list, const char *prompt );
24 |
25 | #endif /* _H_RSEDITINP_RDLN */
26 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/rdln.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/rdln.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: define the interface to the rdln subsystem
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_RSEDITINP_RDLN
16 | #define _H_RSEDITINP_RDLN
17 |
18 | #include
19 |
20 | rs_bool rdln_isa_tty( void );
21 | rs_bool rdln_enabled( void );
22 | void rdln_add_history( obj str );
23 | obj read_console_line( obj completions_list, const char *prompt );
24 |
25 | #endif /* _H_RSEDITINP_RDLN */
26 |
--------------------------------------------------------------------------------
/app/src/main/jni/rscheme/org_evilbinary_rs_Rs.h:
--------------------------------------------------------------------------------
1 | /* DO NOT EDIT THIS FILE - it is machine generated */
2 | #include
3 | /* Header for class org_evilbinary_rs_Rs */
4 |
5 | #ifndef _Included_org_evilbinary_rs_Rs
6 | #define _Included_org_evilbinary_rs_Rs
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 | /*
11 | * Class: org_evilbinary_rs_Rs
12 | * Method: init
13 | * Signature: ()V
14 | */
15 | JNIEXPORT void JNICALL Java_org_evilbinary_rs_Rs_init
16 | (JNIEnv *, jobject);
17 |
18 | /*
19 | * Class: org_evilbinary_rs_Rs
20 | * Method: eval
21 | * Signature: (Ljava/lang/String;)Ljava/lang/String;
22 | */
23 | JNIEXPORT jstring JNICALL Java_org_evilbinary_rs_Rs_eval
24 | (JNIEnv *, jobject, jstring);
25 |
26 | /*
27 | * Class: org_evilbinary_rs_Rs
28 | * Method: exit
29 | * Signature: ()V
30 | */
31 | JNIEXPORT void JNICALL Java_org_evilbinary_rs_Rs_exit
32 | (JNIEnv *, jobject);
33 |
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 | #endif
39 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/irc.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/irc.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:45
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_IRC
15 | #define _H_IRC
16 |
17 | #include
18 | #include
19 | #include
20 |
21 | #define MALLOC(t) ((t *)malloc(sizeof(t)))
22 |
23 | #include
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #endif /* _H_IRC */
31 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/irc.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/irc.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:45
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_IRC
15 | #define _H_IRC
16 |
17 | #include
18 | #include
19 | #include
20 |
21 | #define MALLOC(t) ((t *)malloc(sizeof(t)))
22 |
23 | #include
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #endif /* _H_IRC */
31 |
--------------------------------------------------------------------------------
/RScheme.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/dynlink.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/dynlink.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2003-08-20 13:33:26
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: interface to dynamic linking feature
13 | *------------------------------------------------------------------------*/
14 |
15 | /*
16 | * dynamic linking is an optional feature,
17 | * but the functions are always present (they
18 | * may be stubbed out)
19 | */
20 |
21 | void init_dynamic_link( const char *argv0 );
22 | void done_resolving( void *info );
23 | void *dynamic_link_file( const char *path );
24 | void *resolve_link_symbol( void *info, const char *sym );
25 | const char *dynamic_link_errors( void );
26 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/dynlink.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/dynlink.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2003-08-20 13:33:26
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: interface to dynamic linking feature
13 | *------------------------------------------------------------------------*/
14 |
15 | /*
16 | * dynamic linking is an optional feature,
17 | * but the functions are always present (they
18 | * may be stubbed out)
19 | */
20 |
21 | void init_dynamic_link( const char *argv0 );
22 | void done_resolving( void *info );
23 | void *dynamic_link_file( const char *path );
24 | void *resolve_link_symbol( void *info, const char *sym );
25 | const char *dynamic_link_errors( void );
26 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/runtime.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/runtime.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.5
9 | * File mod date: 1997-11-29 23:10:49
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: include of most things needed to use runtime system
13 | *------------------------------------------------------------------------*/
14 |
15 | /*
16 | * Declaration of the minimal public interface to the
17 | * RScheme runtime system
18 | *
19 | *
20 | */
21 |
22 | #ifndef _H_RSCHEME_RUNTIME
23 | #define _H_RSCHEME_RUNTIME
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #endif /* _H_RSCHEME_RUNTIME */
32 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/runtime.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/runtime.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.5
9 | * File mod date: 1997-11-29 23:10:49
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: include of most things needed to use runtime system
13 | *------------------------------------------------------------------------*/
14 |
15 | /*
16 | * Declaration of the minimal public interface to the
17 | * RScheme runtime system
18 | *
19 | *
20 | */
21 |
22 | #ifndef _H_RSCHEME_RUNTIME
23 | #define _H_RSCHEME_RUNTIME
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #endif /* _H_RSCHEME_RUNTIME */
32 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/rsmodule.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/rsmodule.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: the "RScheme" module, standard runtime system
13 | *------------------------------------------------------------------------*/
14 |
15 | /*
16 | * Provide access to the RScheme Runtime Module
17 | * and it's constituent parts
18 | *
19 | */
20 |
21 | #ifndef _H_RSMODULE
22 | #define _H_RSMODULE
23 |
24 | #include
25 |
26 | extern struct part_descr rscheme_runtime_part; /* 9501 */
27 | extern struct part_descr rscheme_hasht_part; /* 9502 */
28 |
29 | extern struct module_descr module_rscheme;
30 |
31 | #endif /* _H_RSMODULE */
32 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/rsmodule.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/rsmodule.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: the "RScheme" module, standard runtime system
13 | *------------------------------------------------------------------------*/
14 |
15 | /*
16 | * Provide access to the RScheme Runtime Module
17 | * and it's constituent parts
18 | *
19 | */
20 |
21 | #ifndef _H_RSMODULE
22 | #define _H_RSMODULE
23 |
24 | #include
25 |
26 | extern struct part_descr rscheme_runtime_part; /* 9501 */
27 | extern struct part_descr rscheme_hasht_part; /* 9502 */
28 |
29 | extern struct module_descr module_rscheme;
30 |
31 | #endif /* _H_RSMODULE */
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 evilbinary
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/travstat.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/travstat.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.5
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #define GSTATE_IDLE (0)
15 | #define GSTATE_STABLE_SCAN (1)
16 | #define GSTATE_TRAVERSE_1 (2)
17 | #define GSTATE_IGP_SCAN (3)
18 | #define GSTATE_TRAVERSE_2 (4)
19 | #define GSTATE_QUASISTABLE_SCAN (5)
20 | #define GSTATE_TRAVERSE_3 (6)
21 | #define GSTATE_UNSTABLE_SCAN (7)
22 | #define GSTATE_TRAVERSE_4 (8)
23 | #define GSTATE_PHASE2 (9)
24 | #define GSTATE_TRAVERSE_5 (10)
25 |
26 |
27 | #define GSTATE_TERMINATE (11)
28 |
29 | #define GSTATE_REBLACKEN (12)
30 | #define GSTATE_XHEAP_SCAN (13)
31 | #define GSTATE_TRAVERSE_6 (14)
32 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/travstat.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/travstat.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.5
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #define GSTATE_IDLE (0)
15 | #define GSTATE_STABLE_SCAN (1)
16 | #define GSTATE_TRAVERSE_1 (2)
17 | #define GSTATE_IGP_SCAN (3)
18 | #define GSTATE_TRAVERSE_2 (4)
19 | #define GSTATE_QUASISTABLE_SCAN (5)
20 | #define GSTATE_TRAVERSE_3 (6)
21 | #define GSTATE_UNSTABLE_SCAN (7)
22 | #define GSTATE_TRAVERSE_4 (8)
23 | #define GSTATE_PHASE2 (9)
24 | #define GSTATE_TRAVERSE_5 (10)
25 |
26 |
27 | #define GSTATE_TERMINATE (11)
28 |
29 | #define GSTATE_REBLACKEN (12)
30 | #define GSTATE_XHEAP_SCAN (13)
31 | #define GSTATE_TRAVERSE_6 (14)
32 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/clientyp.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/clientyp.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2000-11-21 23:25:08
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_CLIENTYP
15 | #define _H_CLIENTYP
16 |
17 | /* types that the client is obligated to provide */
18 |
19 | #include
20 | #include
21 |
22 | typedef struct _stableRI {
23 | obj *last_ptr;
24 | struct unit_root_iterator uri;
25 | } IRC_clientStableRootIterator;
26 |
27 | typedef unsigned IRC_clientQuasistableRootIterator;
28 |
29 | typedef struct _unstableRI {
30 | obj *stack_cache;
31 | unsigned sig_queue;
32 | } IRC_clientUnstableRootIterator;
33 |
34 | #endif /* _H_CLIENTYP */
35 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/clientyp.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/clientyp.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2000-11-21 23:25:08
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_CLIENTYP
15 | #define _H_CLIENTYP
16 |
17 | /* types that the client is obligated to provide */
18 |
19 | #include
20 | #include
21 |
22 | typedef struct _stableRI {
23 | obj *last_ptr;
24 | struct unit_root_iterator uri;
25 | } IRC_clientStableRootIterator;
26 |
27 | typedef unsigned IRC_clientQuasistableRootIterator;
28 |
29 | typedef struct _unstableRI {
30 | obj *stack_cache;
31 | unsigned sig_queue;
32 | } IRC_clientUnstableRootIterator;
33 |
34 | #endif /* _H_CLIENTYP */
35 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/heapi.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/heapi/heapi.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1997-11-29 23:10:44
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HEAPI
15 | #define _H_HEAPI
16 |
17 | #include
18 | #include
19 |
20 | void save_image( FILE *f, obj entry, obj refs, obj opt );
21 | obj load_image( FILE *f, obj link_table );
22 |
23 | obj load_image_file( const char *path, obj link_table, obj opts,
24 | int *fmt_vers );
25 | void save_image_file( const char *path, obj entry, obj refs, obj opt );
26 |
27 | /* possible image file format versions */
28 |
29 | #define FMTV_RSCHEME_0_5 (50)
30 | #define FMTV_RSCHEME_0_6 (60)
31 | #define FMTV_RSCHEME_0_6_BOOT (61)
32 |
33 | #endif /* _H_HEAPI */
34 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/heapi.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/heapi/heapi.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1997-11-29 23:10:44
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HEAPI
15 | #define _H_HEAPI
16 |
17 | #include
18 | #include
19 |
20 | void save_image( FILE *f, obj entry, obj refs, obj opt );
21 | obj load_image( FILE *f, obj link_table );
22 |
23 | obj load_image_file( const char *path, obj link_table, obj opts,
24 | int *fmt_vers );
25 | void save_image_file( const char *path, obj entry, obj refs, obj opt );
26 |
27 | /* possible image file format versions */
28 |
29 | #define FMTV_RSCHEME_0_5 (50)
30 | #define FMTV_RSCHEME_0_6 (60)
31 | #define FMTV_RSCHEME_0_6_BOOT (61)
32 |
33 | #endif /* _H_HEAPI */
34 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/buildenv/module.mak:
--------------------------------------------------------------------------------
1 | OFILES=$(CFILES:.c=.o)
2 | SOFILES=$(CFILES:.c=.so)
3 | # INSTALL_DIR=/data/data/org.evilbinary.cl/system/rs
4 | include $(INSTALL_DIR)/resource/buildenv/preamble.mak
5 |
6 | LD=ld
7 | LD_FLAGS=-r
8 |
9 | $(PRODUCT): $(OFILES)
10 | $(LD) $(LD_FLAGS) $(OFILES) -o $(PRODUCT)
11 |
12 | clean::
13 | rm -f $(PRODUCT) $(OFILES) $(SOFILES)
14 |
15 | $(INSTALL_DIR)/include/rscheme/pkgs:
16 | mkdir $(INSTALL_DIR)/include/rscheme/pkgs
17 |
18 | install:: $(PRODUCT) $(INSTALL_DIR)/include/rscheme/pkgs
19 | cp $(PRODUCT) $(INSTALL_DIR)/lib
20 | cp $(INCFILES) $(INSTALL_DIR)/include/rscheme/pkgs
21 | cp $(MIFBASEFILE).mif $(INSTALL_DIR)/resource/modules
22 | cp $(MIFBASEFILE).mx $(INSTALL_DIR)/resource/modules
23 |
24 | SO_PRODUCT=lib$(PRODUCT:.o=.so)
25 | $(SO_PRODUCT): $(SOFILES)
26 | $(CC) -shared $(SOFILES) -o $(SO_PRODUCT) $(XLFLAGS)
27 |
28 | %.so: %.c
29 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $^
30 |
31 | install.so: $(SO_PRODUCT)
32 | cp $(SO_PRODUCT) $(INSTALL_DIR)/resource/modules
33 | cp $(INCFILES) $(INSTALL_DIR)/include/rscheme/pkgs
34 | cp $(MIFBASEFILE).mif $(INSTALL_DIR)/resource/modules
35 | cp $(MIFBASEFILE).mx $(INSTALL_DIR)/resource/modules
36 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcconfig.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcconfig.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_CONFIG
15 | #define _H_CONFIG
16 |
17 | #include
18 |
19 | #define NUM_GENERATIONS (1)
20 |
21 | #define NUM_STEPS (1)
22 |
23 | /* in the current logical->physical mapping,
24 | only [0,1] are squished together
25 | */
26 |
27 | #define NUM_PHYSICAL_SIZE_CLASSES (NUM_LOGICAL_SIZE_CLASSES-1)
28 |
29 | /* how fast to grab memory (per heap) */
30 |
31 | #define ALLOCATION_CHUNK_SIZE (64*1024)
32 |
33 | /* how often to do some work */
34 |
35 | #define INCREMENT_SPACING (20000)
36 |
37 | /* how much work to do */
38 |
39 | #define INCREMENT_WORK (30000)
40 |
41 | #endif /* _H_CONFIG */
42 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcconfig.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcconfig.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_CONFIG
15 | #define _H_CONFIG
16 |
17 | #include
18 |
19 | #define NUM_GENERATIONS (1)
20 |
21 | #define NUM_STEPS (1)
22 |
23 | /* in the current logical->physical mapping,
24 | only [0,1] are squished together
25 | */
26 |
27 | #define NUM_PHYSICAL_SIZE_CLASSES (NUM_LOGICAL_SIZE_CLASSES-1)
28 |
29 | /* how fast to grab memory (per heap) */
30 |
31 | #define ALLOCATION_CHUNK_SIZE (64*1024)
32 |
33 | /* how often to do some work */
34 |
35 | #define INCREMENT_SPACING (20000)
36 |
37 | /* how much work to do */
38 |
39 | #define INCREMENT_WORK (30000)
40 |
41 | #endif /* _H_CONFIG */
42 |
--------------------------------------------------------------------------------
/app/src/main/java/org/evilbinary/rs/Rs.java:
--------------------------------------------------------------------------------
1 | package org.evilbinary.rs;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 | import java.util.Collections;
6 | import java.util.List;
7 |
8 | /**
9 | * 作者:evilbinary on 4/17/16.
10 | * 邮箱:rootdebug@163.com
11 | */
12 | public class Rs {
13 | private String homePath;
14 | private String[] args;
15 |
16 | public Rs() {
17 | this.args = new String[1];
18 | this.args[0] = this.getClass().getSimpleName();
19 | this.homePath = "";
20 | }
21 |
22 | public void init(String homePath, String args) {
23 | String src[] = args.split(",");
24 | init(homePath, src);
25 | }
26 |
27 | public void init(String homePath, String[] argv) {
28 | int len = this.args.length;
29 | String[] newArgs = new String[argv.length + 1];
30 | System.arraycopy(this.args, 0, newArgs, 0, len);
31 | System.arraycopy(argv, 0, newArgs, len, argv.length);
32 | this.args = newArgs;
33 | this.homePath = homePath;
34 | System.loadLibrary("myrs");
35 | init();
36 |
37 | }
38 |
39 | public native void init();
40 |
41 | public native String eval(String exp);
42 |
43 | public native void exit();
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/stdmodul.h:
--------------------------------------------------------------------------------
1 | #ifndef _H_RSCHEME_STDMODUL
2 | #define _H_RSCHEME_STDMODUL
3 |
4 | #include
5 | extern struct module_descr module_codegen;
6 | extern struct module_descr module_compiler;
7 | extern struct module_descr module_editinp;
8 | extern struct module_descr module_imageio;
9 | extern struct module_descr module_sort;
10 | extern struct module_descr module_regex;
11 | extern struct module_descr module_high_scheme;
12 | extern struct module_descr module_iolib;
13 | extern struct module_descr module_mathlib;
14 | extern struct module_descr module_tables;
15 | extern struct module_descr module_objsys;
16 | extern struct module_descr module_low_scheme;
17 | extern struct module_descr module_corelib;
18 | extern struct module_descr module_bci;
19 | extern struct module_descr module_rscheme;
20 |
21 | #define STD_MODULES_DECL &module_codegen, \
22 | &module_compiler, \
23 | &module_editinp, \
24 | &module_imageio, \
25 | &module_sort, \
26 | &module_regex, \
27 | &module_high_scheme, \
28 | &module_iolib, \
29 | &module_mathlib, \
30 | &module_tables, \
31 | &module_objsys, \
32 | &module_low_scheme, \
33 | &module_corelib, \
34 | &module_bci, \
35 | &module_rscheme, (struct module_descr *)0
36 | #endif /* _H_RSCHEME_STDMODUL */
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/stdmodul.h:
--------------------------------------------------------------------------------
1 | #ifndef _H_RSCHEME_STDMODUL
2 | #define _H_RSCHEME_STDMODUL
3 |
4 | #include
5 | extern struct module_descr module_codegen;
6 | extern struct module_descr module_compiler;
7 | extern struct module_descr module_editinp;
8 | extern struct module_descr module_imageio;
9 | extern struct module_descr module_sort;
10 | extern struct module_descr module_regex;
11 | extern struct module_descr module_high_scheme;
12 | extern struct module_descr module_iolib;
13 | extern struct module_descr module_mathlib;
14 | extern struct module_descr module_tables;
15 | extern struct module_descr module_objsys;
16 | extern struct module_descr module_low_scheme;
17 | extern struct module_descr module_corelib;
18 | extern struct module_descr module_bci;
19 | extern struct module_descr module_rscheme;
20 |
21 | #define STD_MODULES_DECL &module_codegen, \
22 | &module_compiler, \
23 | &module_editinp, \
24 | &module_imageio, \
25 | &module_sort, \
26 | &module_regex, \
27 | &module_high_scheme, \
28 | &module_iolib, \
29 | &module_mathlib, \
30 | &module_tables, \
31 | &module_objsys, \
32 | &module_low_scheme, \
33 | &module_corelib, \
34 | &module_bci, \
35 | &module_rscheme, (struct module_descr *)0
36 | #endif /* _H_RSCHEME_STDMODUL */
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/stack.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stack.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:49
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: continuation stack interface
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_STACK
16 | #define _H_STACK
17 |
18 | /************************ NOT using a stack cache ************************/
19 |
20 | CIH_DECL bool in_stack_cache( obj value );
21 | CIH_DECL void flush_stack_cache( void );
22 | CIH_DECL void init_stack_cache( void );
23 |
24 | void push_cont( jump_addr label, unsigned reg_space );
25 |
26 | #define SET_PARTCONT_REG(reg,value) gvec_write_fresh( \
27 | continuation_reg, SLOT((reg)+CONT_FIXED), value )
28 | #define PUSH_PARTCONT_ADDR(addr,space) push_cont(addr,space)
29 | #define PARTCONT_REF(i) gvec_read(continuation_reg,SLOT(i))
30 |
31 | unsigned restore_arb( void ); /* restore run-time dep't # regs */
32 |
33 | #ifdef INLINES
34 | #include
35 | #endif
36 |
37 | #endif /* _H_STACK */
38 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/stack.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stack.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:49
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: continuation stack interface
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_STACK
16 | #define _H_STACK
17 |
18 | /************************ NOT using a stack cache ************************/
19 |
20 | CIH_DECL bool in_stack_cache( obj value );
21 | CIH_DECL void flush_stack_cache( void );
22 | CIH_DECL void init_stack_cache( void );
23 |
24 | void push_cont( jump_addr label, unsigned reg_space );
25 |
26 | #define SET_PARTCONT_REG(reg,value) gvec_write_fresh( \
27 | continuation_reg, SLOT((reg)+CONT_FIXED), value )
28 | #define PUSH_PARTCONT_ADDR(addr,space) push_cont(addr,space)
29 | #define PARTCONT_REF(i) gvec_read(continuation_reg,SLOT(i))
30 |
31 | unsigned restore_arb( void ); /* restore run-time dep't # regs */
32 |
33 | #ifdef INLINES
34 | #include
35 | #endif
36 |
37 | #endif /* _H_STACK */
38 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/editinp.doc:
--------------------------------------------------------------------------------
1 | (editinp (corelib high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) (input-isa-tty? readline-enabled? readline-read-line use-secondary? completions with-edit-port primary-prompt open-edit-port-from secondary-prompt set-completions! set-secondary-prompt! set-use-secondary?! readline-add-to-history set-primary-prompt! ) (("modules/editinp/editinp.scm" class ()) ("modules/editinp/editinp.scm" class ()) ("modules/editinp/editinp.scm" method more-input-ready? ()) ("modules/editinp/editinp.scm" method provide-more-input ()) ("modules/editinp/editinp.scm" method input-port-scan-token ()) ("modules/editinp/editinp.scm" method open-edit-port-from ()) ("modules/editinp/editinp.scm" method open-edit-port-from ()) ("modules/editinp/editinp.scm" function with-edit-port ()) ("modules/editinp/readlin.scm" glue input-isa-tty? ((type function))) ("modules/editinp/readlin.scm" glue readline-enabled? ((type function))) ("modules/editinp/readlin.scm" glue readline-add-to-history ((type function))) ("modules/editinp/readlin.scm" glue readline-read-line ((type function))) ("modules/editinp/readlin.scm" class ()) ("modules/editinp/readlin.scm" method more-input-ready? ()) ("modules/editinp/readlin.scm" method provide-more-input ()) ("modules/editinp/readlin.scm" method open-edit-port-from ())))
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/ntohd.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/ntohd.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | IEEE_32 htonf( IEEE_32 f )
15 | {
16 | union { IEEE_32 f; UINT_32 i; } X;
17 |
18 | X.f = f;
19 | X.i = HOST_TO_BIG_ENDIAN_32(X.i);
20 | return X.f;
21 | }
22 |
23 | IEEE_32 ntohf( IEEE_32 f )
24 | {
25 | union { IEEE_32 f; UINT_32 i; } X;
26 |
27 | X.f = f;
28 | X.i = BIG_ENDIAN_TO_HOST_32(X.i);
29 | return X.f;
30 | }
31 |
32 | IEEE_64 htond( IEEE_64 d )
33 | {
34 | union { IEEE_64 d; UINT_32 i[2]; } X;
35 | UINT_32 temp;
36 |
37 | X.d = d;
38 | temp = HOST_TO_BIG_ENDIAN_32(X.i[0]);
39 | X.i[0] = HOST_TO_BIG_ENDIAN_32(X.i[1]);
40 | X.i[1] = temp;
41 | return X.d;
42 | }
43 |
44 | IEEE_64 ntohd( IEEE_64 d )
45 | {
46 | union { IEEE_64 d; UINT_32 i[2]; } X;
47 | UINT_32 temp;
48 |
49 | X.d = d;
50 | temp = BIG_ENDIAN_TO_HOST_32(X.i[0]);
51 | X.i[0] = BIG_ENDIAN_TO_HOST_32(X.i[1]);
52 | X.i[1] = temp;
53 | return X.d;
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/ntohd.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/ntohd.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.3
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | IEEE_32 htonf( IEEE_32 f )
15 | {
16 | union { IEEE_32 f; UINT_32 i; } X;
17 |
18 | X.f = f;
19 | X.i = HOST_TO_BIG_ENDIAN_32(X.i);
20 | return X.f;
21 | }
22 |
23 | IEEE_32 ntohf( IEEE_32 f )
24 | {
25 | union { IEEE_32 f; UINT_32 i; } X;
26 |
27 | X.f = f;
28 | X.i = BIG_ENDIAN_TO_HOST_32(X.i);
29 | return X.f;
30 | }
31 |
32 | IEEE_64 htond( IEEE_64 d )
33 | {
34 | union { IEEE_64 d; UINT_32 i[2]; } X;
35 | UINT_32 temp;
36 |
37 | X.d = d;
38 | temp = HOST_TO_BIG_ENDIAN_32(X.i[0]);
39 | X.i[0] = HOST_TO_BIG_ENDIAN_32(X.i[1]);
40 | X.i[1] = temp;
41 | return X.d;
42 | }
43 |
44 | IEEE_64 ntohd( IEEE_64 d )
45 | {
46 | union { IEEE_64 d; UINT_32 i[2]; } X;
47 | UINT_32 temp;
48 |
49 | X.d = d;
50 | temp = BIG_ENDIAN_TO_HOST_32(X.i[0]);
51 | X.i[0] = BIG_ENDIAN_TO_HOST_32(X.i[1]);
52 | X.i[1] = temp;
53 | return X.d;
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcadapt.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gcadapt/irc/gcadapt.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 1997-11-29 23:10:45
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: RScheme/GC Adapter interface declaration
13 | *------------------------------------------------------------------------*/
14 |
15 | /* interface to the garbage collector */
16 |
17 | #include
18 |
19 | extern INT_32 gc_alloc_time;
20 |
21 | CIH_DECL void gc_safe_point( UINT_32 size );
22 |
23 | #define gc_alloc(n) (gc_alloc_time -= (n), IRC_alloc( gc_arena, (n) ))
24 |
25 | #define write_barrier(lobj,ptr,robj) IRC_writeBarrier(gc_arena, \
26 | lobj,((char *)(ptr)\
27 | -(char*)(lobj)),\
28 | robj)\
29 |
30 | #define write_barrier_lval_clobber(x,y) do { } while (0)
31 | #define write_barrier_lval_fresh(x,y,z) do { } while (0)
32 | #define write_barrier_lval_init(x,y,z) do { } while (0)
33 |
34 | void init_gc( int argc, const char **argv );
35 |
36 | int gc_for_each( int (*fn)( void *info, void *heap_obj ), void *info );
37 |
38 | CIH_DECL gc_obj_addr cast_and_deref_ptr( pos_ptr_addr slot );
39 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcadapt.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gcadapt/irc/gcadapt.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 1997-11-29 23:10:45
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: RScheme/GC Adapter interface declaration
13 | *------------------------------------------------------------------------*/
14 |
15 | /* interface to the garbage collector */
16 |
17 | #include
18 |
19 | extern INT_32 gc_alloc_time;
20 |
21 | CIH_DECL void gc_safe_point( UINT_32 size );
22 |
23 | #define gc_alloc(n) (gc_alloc_time -= (n), IRC_alloc( gc_arena, (n) ))
24 |
25 | #define write_barrier(lobj,ptr,robj) IRC_writeBarrier(gc_arena, \
26 | lobj,((char *)(ptr)\
27 | -(char*)(lobj)),\
28 | robj)\
29 |
30 | #define write_barrier_lval_clobber(x,y) do { } while (0)
31 | #define write_barrier_lval_fresh(x,y,z) do { } while (0)
32 | #define write_barrier_lval_init(x,y,z) do { } while (0)
33 |
34 | void init_gc( int argc, const char **argv );
35 |
36 | int gc_for_each( int (*fn)( void *info, void *heap_obj ), void *info );
37 |
38 | CIH_DECL gc_obj_addr cast_and_deref_ptr( pos_ptr_addr slot );
39 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/alloc.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/alloc.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 1998-12-05 16:12:24
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_ALLOC
15 | #define _H_ALLOC
16 |
17 | #include
18 |
19 | #ifdef NDEBUG
20 | #define atracef ((FILE *)0)
21 | #else
22 | extern FILE *atracef;
23 | #endif
24 |
25 | IRC_Header *IRC_growSizeClass( IRC_Heap *heap,
26 | IRC_SizeClass *sc,
27 | UINT_32 size );
28 | /* aix: -Q+IRC_getBlock */
29 |
30 | #ifdef __GNUC__
31 | inline
32 | #endif
33 | static void *IRC_getBlock( IRC_Heap *heap, IRC_SizeClass *sc, UINT_32 size )
34 | {
35 | IRC_Header *p = sc->free;
36 |
37 | if (p == &sc->marker)
38 | {
39 | p = IRC_growSizeClass( heap, sc, size );
40 | }
41 | p->sizeClass = sc; /* may have died from an older size class */
42 |
43 | if (WATCH_IT(p))
44 | printf( "IRC_getBlock: %p\n", p );
45 | #if FREE_HAS_DEADBEEF
46 | assert( p->flagBits == 0xDEADBEEF );
47 | #endif
48 |
49 | sc->free = p->next;
50 | p->flagBits = sc->initFlagBits;
51 | return p+1;
52 | }
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/alloc.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/alloc.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 1998-12-05 16:12:24
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_ALLOC
15 | #define _H_ALLOC
16 |
17 | #include
18 |
19 | #ifdef NDEBUG
20 | #define atracef ((FILE *)0)
21 | #else
22 | extern FILE *atracef;
23 | #endif
24 |
25 | IRC_Header *IRC_growSizeClass( IRC_Heap *heap,
26 | IRC_SizeClass *sc,
27 | UINT_32 size );
28 | /* aix: -Q+IRC_getBlock */
29 |
30 | #ifdef __GNUC__
31 | inline
32 | #endif
33 | static void *IRC_getBlock( IRC_Heap *heap, IRC_SizeClass *sc, UINT_32 size )
34 | {
35 | IRC_Header *p = sc->free;
36 |
37 | if (p == &sc->marker)
38 | {
39 | p = IRC_growSizeClass( heap, sc, size );
40 | }
41 | p->sizeClass = sc; /* may have died from an older size class */
42 |
43 | if (WATCH_IT(p))
44 | printf( "IRC_getBlock: %p\n", p );
45 | #if FREE_HAS_DEADBEEF
46 | assert( p->flagBits == 0xDEADBEEF );
47 | #endif
48 |
49 | sc->free = p->next;
50 | p->flagBits = sc->initFlagBits;
51 | return p+1;
52 | }
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/allocns.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/allocns.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1997-11-29 23:10:48
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: maken() functions
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_RSCHEME_ALLOCNS
16 | #define _H_RSCHEME_ALLOCNS
17 |
18 | obj make0( obj the_class );
19 | obj make1( obj the_class, obj value0 );
20 | obj make2( obj the_class, obj value0, obj value1 );
21 | obj make3( obj the_class, obj value0, obj value1, obj value2 );
22 | obj make4( obj the_class, obj value0, obj value1, obj value2,
23 | obj value3 );
24 | obj make5( obj the_class, obj value0, obj value1, obj value2,
25 | obj value3, obj value4 );
26 | obj make6( obj the_class, obj value0, obj value1, obj value2,
27 | obj value3, obj value4, obj value5 );
28 | obj make7( obj the_class, obj value0, obj value1, obj value2,
29 | obj value3, obj value4, obj value5,
30 | obj value6 );
31 | obj make8( obj the_class, obj value0, obj value1, obj value2,
32 | obj value3, obj value4, obj value5,
33 | obj value6, obj value7 );
34 | obj make9( obj the_class, obj value0, obj value1, obj value2,
35 | obj value3, obj value4, obj value5,
36 | obj value6, obj value7, obj value8 );
37 | obj maken( obj the_class, unsigned n, ... );
38 |
39 | #endif /* _H_RSCHEME_ALLOCNS */
40 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/allocns.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/allocns.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1997-11-29 23:10:48
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: maken() functions
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_RSCHEME_ALLOCNS
16 | #define _H_RSCHEME_ALLOCNS
17 |
18 | obj make0( obj the_class );
19 | obj make1( obj the_class, obj value0 );
20 | obj make2( obj the_class, obj value0, obj value1 );
21 | obj make3( obj the_class, obj value0, obj value1, obj value2 );
22 | obj make4( obj the_class, obj value0, obj value1, obj value2,
23 | obj value3 );
24 | obj make5( obj the_class, obj value0, obj value1, obj value2,
25 | obj value3, obj value4 );
26 | obj make6( obj the_class, obj value0, obj value1, obj value2,
27 | obj value3, obj value4, obj value5 );
28 | obj make7( obj the_class, obj value0, obj value1, obj value2,
29 | obj value3, obj value4, obj value5,
30 | obj value6 );
31 | obj make8( obj the_class, obj value0, obj value1, obj value2,
32 | obj value3, obj value4, obj value5,
33 | obj value6, obj value7 );
34 | obj make9( obj the_class, obj value0, obj value1, obj value2,
35 | obj value3, obj value4, obj value5,
36 | obj value6, obj value7, obj value8 );
37 | obj maken( obj the_class, unsigned n, ... );
38 |
39 | #endif /* _H_RSCHEME_ALLOCNS */
40 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/traverse.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/traverse.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.8
9 | * File mod date: 2003-10-14 13:29:05
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_TRAVERSE
15 | #define _H_TRAVERSE
16 |
17 | #include
18 |
19 | /* IRC traversal protocol */
20 |
21 | #define IRC_TRAV(travActions,ptr) (travActions[IRCH(ptr)->flagBits & 0xF])
22 |
23 | CIH_DECL void IRC_clientFindPointers( void *ircInfo, void *item, UINT_8 *travActions );
24 | int IRC_foundPointer( void *ircInfo, void *ptr );
25 |
26 | CIH_DECL void IRC_clientStableRootIteratorInit( IRC_clientStableRootIterator *i );
27 | CIH_DECL void *IRC_clientStableRootIteratorNext( IRC_clientStableRootIterator *i );
28 | CIH_DECL void IRC_clientStableRootWasUnmapped( IRC_clientStableRootIterator *i );
29 |
30 | CIH_DECL void IRC_clientQuasistableRootIteratorInit(
31 | IRC_clientQuasistableRootIterator *i );
32 | CIH_DECL void *IRC_clientQuasistableRootIteratorNext(
33 | IRC_clientQuasistableRootIterator *i );
34 | CIH_DECL void IRC_clientQuasistableRootWasUnmapped( IRC_clientQuasistableRootIterator *i );
35 |
36 | CIH_DECL void IRC_clientUnstableRootIteratorInit( IRC_clientUnstableRootIterator *i );
37 | CIH_DECL void *IRC_clientUnstableRootIteratorNext( IRC_clientUnstableRootIterator *i );
38 | CIH_DECL void IRC_clientUnstableRootWasUnmapped( IRC_clientUnstableRootIterator *i );
39 |
40 | #endif /* _H_TRAVERSE */
41 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/traverse.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/traverse.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.8
9 | * File mod date: 2003-10-14 13:29:05
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_TRAVERSE
15 | #define _H_TRAVERSE
16 |
17 | #include
18 |
19 | /* IRC traversal protocol */
20 |
21 | #define IRC_TRAV(travActions,ptr) (travActions[IRCH(ptr)->flagBits & 0xF])
22 |
23 | CIH_DECL void IRC_clientFindPointers( void *ircInfo, void *item, UINT_8 *travActions );
24 | int IRC_foundPointer( void *ircInfo, void *ptr );
25 |
26 | CIH_DECL void IRC_clientStableRootIteratorInit( IRC_clientStableRootIterator *i );
27 | CIH_DECL void *IRC_clientStableRootIteratorNext( IRC_clientStableRootIterator *i );
28 | CIH_DECL void IRC_clientStableRootWasUnmapped( IRC_clientStableRootIterator *i );
29 |
30 | CIH_DECL void IRC_clientQuasistableRootIteratorInit(
31 | IRC_clientQuasistableRootIterator *i );
32 | CIH_DECL void *IRC_clientQuasistableRootIteratorNext(
33 | IRC_clientQuasistableRootIterator *i );
34 | CIH_DECL void IRC_clientQuasistableRootWasUnmapped( IRC_clientQuasistableRootIterator *i );
35 |
36 | CIH_DECL void IRC_clientUnstableRootIteratorInit( IRC_clientUnstableRootIterator *i );
37 | CIH_DECL void *IRC_clientUnstableRootIteratorNext( IRC_clientUnstableRootIterator *i );
38 | CIH_DECL void IRC_clientUnstableRootWasUnmapped( IRC_clientUnstableRootIterator *i );
39 |
40 | #endif /* _H_TRAVERSE */
41 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/hacks.doc:
--------------------------------------------------------------------------------
1 | (hacks (paths repl mlink codegen corelib tables mathlib objsys low-scheme iolib *scheme* primops precore) (repl disassemble bytecodes get-debug-info get-source-location) (("modules/hacks/debugapi.scm" function get-debug-info ()) ("modules/hacks/debugapi.scm" function get-source-location ()) ("modules/hacks/disassem.scm" class ()) ("modules/hacks/disassem.scm" function with-output-to-tabbing-port ()) ("modules/hacks/disassem.scm" function find-next-tab ()) ("modules/hacks/disassem.scm" method output-port-write-char ()) ("modules/hacks/disassem.scm" function spaces ()) ("modules/hacks/disassem.scm" method bytecodes ()) ("modules/hacks/disassem.scm" method bytecodes ()) ("modules/hacks/disassem.scm" variable *bytecode-vec* ()) ("modules/hacks/disassem.scm" variable *primop-vec* ()) ("modules/hacks/disassem.scm" variable *tried-loading-disassembly-info* ()) ("modules/hacks/disassem.scm" function load-disassembly-table ()) ("modules/hacks/disassem.scm" function force-disassembly-info ()) ("modules/hacks/disassem.scm" function with-litnum ()) ("modules/hacks/disassem.scm" function disassem-tl-var ()) ("modules/hacks/disassem.scm" function disassem-literal ()) ("modules/hacks/disassem.scm" function disassem-lex-ref ()) ("modules/hacks/disassem.scm" function disassem-branch-if-false ()) ("modules/hacks/disassem.scm" variable *bytecode-arg-disassemblers* ()) ("modules/hacks/disassem.scm" function disassemble-insn ()) ("modules/hacks/disassem.scm" function disassemble-primop ()) ("modules/hacks/disassem.scm" function disassemble* ()) ("modules/hacks/disassem.scm" function disassemble ()) ("modules/hacks/disassem.scm" method print ()) ("modules/hacks/disassem.scm" method print ()) ("modules/hacks/repl.scm" method env-and-name ()) ("modules/hacks/repl.scm" method env-and-name ()) ("modules/hacks/repl.scm" method env-and-name ()) ("modules/hacks/repl.scm" function repl-in ()) ("modules/hacks/repl.scm" method repl ())))
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/hashmain.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/hasht/hashmain.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2003-12-15 09:43:26
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HASHMAIN
15 | #define _H_HASHMAIN
16 |
17 | #include
18 |
19 |
20 | obj stringtable_lookup( obj table, obj hash, obj str );
21 | obj stringtable_insert( obj table, obj hash, obj str, obj value );
22 | obj stringtable_remove( obj table, obj hash, obj str );
23 | rs_bool stringtable_probe( obj table, obj hash, obj str );
24 |
25 | obj cistringtable_lookup( obj table, obj hash, obj str );
26 | obj cistringtable_insert( obj table, obj hash, obj str, obj value );
27 | obj cistringtable_remove( obj table, obj hash, obj str );
28 | rs_bool cistringtable_probe( obj table, obj hash, obj str );
29 |
30 | obj objecttable_lookup( obj table, obj hash, obj key );
31 | obj objecttable_insert( obj table, obj hash, obj key, obj value );
32 | obj objecttable_remove( obj table, obj hash, obj key );
33 | rs_bool objecttable_probe( obj table, obj hash, obj key );
34 |
35 | /* bool hashtable_probe( obj table, obj hash ); */
36 | void hashtable_install( obj table, obj hash, obj key, obj value );
37 | void hashtable_foreach( obj table, void *info,
38 | void (*fn)( void *info, obj h, obj key, obj value ) );
39 | obj hashtable_chains( obj table );
40 | obj hashtable_copy( obj tbl );
41 |
42 | obj hashtable_keys_to_list( obj table );
43 | obj hashtable_values_to_list( obj table );
44 | UINT_32 hashtable_size( obj table );
45 |
46 | void hashtable_clear( obj table );
47 |
48 | #endif /* _H_HASHMAIN */
49 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/hashmain.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/hasht/hashmain.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2003-12-15 09:43:26
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HASHMAIN
15 | #define _H_HASHMAIN
16 |
17 | #include
18 |
19 |
20 | obj stringtable_lookup( obj table, obj hash, obj str );
21 | obj stringtable_insert( obj table, obj hash, obj str, obj value );
22 | obj stringtable_remove( obj table, obj hash, obj str );
23 | rs_bool stringtable_probe( obj table, obj hash, obj str );
24 |
25 | obj cistringtable_lookup( obj table, obj hash, obj str );
26 | obj cistringtable_insert( obj table, obj hash, obj str, obj value );
27 | obj cistringtable_remove( obj table, obj hash, obj str );
28 | rs_bool cistringtable_probe( obj table, obj hash, obj str );
29 |
30 | obj objecttable_lookup( obj table, obj hash, obj key );
31 | obj objecttable_insert( obj table, obj hash, obj key, obj value );
32 | obj objecttable_remove( obj table, obj hash, obj key );
33 | rs_bool objecttable_probe( obj table, obj hash, obj key );
34 |
35 | /* bool hashtable_probe( obj table, obj hash ); */
36 | void hashtable_install( obj table, obj hash, obj key, obj value );
37 | void hashtable_foreach( obj table, void *info,
38 | void (*fn)( void *info, obj h, obj key, obj value ) );
39 | obj hashtable_chains( obj table );
40 | obj hashtable_copy( obj tbl );
41 |
42 | obj hashtable_keys_to_list( obj table );
43 | obj hashtable_values_to_list( obj table );
44 | UINT_32 hashtable_size( obj table );
45 |
46 | void hashtable_clear( obj table );
47 |
48 | #endif /* _H_HASHMAIN */
49 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | import org.apache.tools.ant.taskdefs.condition.Os
2 |
3 | apply plugin: 'com.android.application'
4 |
5 |
6 | android {
7 | compileSdkVersion 23
8 | buildToolsVersion "23.0.3"
9 |
10 | defaultConfig {
11 | applicationId "org.evilbinary.rs"
12 | minSdkVersion 17
13 | targetSdkVersion 23
14 | versionCode 1
15 | versionName "1.0"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 |
24 | sourceSets {
25 | main{
26 | jniLibs.srcDir 'libs'
27 | jni.srcDirs = []
28 | }
29 | }
30 |
31 | task ndkBuild(type: Exec) {
32 | def Properties localProps = new Properties()
33 | localProps.load(new FileInputStream("local.properties"))
34 | def ndk_dir = localProps['ndk.dir']
35 | def ndk_build_cmd = "$ndk_dir/ndk-build"
36 | if (Os.isFamily(Os.FAMILY_WINDOWS)) {
37 | ndk_build_cmd = "$ndk_dir/ndk-build.cmd"
38 | }
39 | commandLine ndk_build_cmd, '-j', Runtime.runtime.availableProcessors()/2, "NDK_OUT=$buildDir/native/obj","NDK_LIBS_OUT=$projectDir/libs", "NDK_PROJECT_PATH=$projectDir/src/main/"
40 | }
41 |
42 | tasks.withType(JavaCompile) {
43 | compileTask -> compileTask.dependsOn ndkBuild
44 | }
45 | applicationVariants.all { variant ->
46 | variant.outputs.each { output ->
47 | def outputFile = output.outputFile
48 | if (outputFile != null && outputFile.name.endsWith('.apk')) {
49 | def fileName = "rscheme-${defaultConfig.versionName}.apk"
50 | output.outputFile = new File(outputFile.parent, fileName)
51 | }
52 | }
53 | }
54 |
55 |
56 | }
57 |
58 | dependencies {
59 | compile fileTree(dir: 'libs', include: ['*.jar'])
60 | testCompile 'junit:junit:4.12'
61 | compile 'com.android.support:appcompat-v7:23.2.1'
62 | }
63 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/chektype.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/chektype.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include /* get GVEC_P and BVEC_P */
15 |
16 | #define TYPE_CHECKER(check_name,class_name,test) \
17 | CI_DECL obj check_name( obj thing, int fplace_code ) \
18 | { \
19 | if (!test(thing)) \
20 | type_check_error( thing, class_name, fplace_code ); \
21 | return thing; \
22 | }
23 |
24 | TYPE_CHECKER(check_ptr,"",OBJ_ISA_PTR)
25 | TYPE_CHECKER(check_immob,"",OBJ_ISA_IMMOB)
26 | TYPE_CHECKER(check_fixnum,"",OBJ_ISA_FIXNUM)
27 | TYPE_CHECKER(check_gvec,"",GVEC_P)
28 | TYPE_CHECKER(check_bvec,"",BVEC_P)
29 | TYPE_CHECKER(check_pair,"",PAIR_P)
30 | TYPE_CHECKER(check_symbol,"",SYMBOL_P)
31 | TYPE_CHECKER(check_vector,"",VECTOR_P)
32 | TYPE_CHECKER(check_function,"",FUNCTION_P)
33 | TYPE_CHECKER(check_class,"<>",CLASS_P)
34 | TYPE_CHECKER(check_string,"",STRING_P)
35 | TYPE_CHECKER(check_double_float,"",LONGFLOAT_P)
36 | TYPE_CHECKER(check_long_int,"",LONG_INT_P)
37 | TYPE_CHECKER(check_ascii_char,"",OBJ_ISA_ASCII_CHAR)
38 | TYPE_CHECKER(check_unicode_char,"",OBJ_ISA_UNICODE_CHAR)
39 | TYPE_CHECKER(check_boolean,"",OBJ_ISA_BOOLEAN)
40 |
41 | CI_DECL obj check_instance( obj thing, obj req_class, int fplace_code )
42 | {
43 | if (!instance_p(thing,req_class))
44 | type_check_error( thing,
45 | symbol_text( class_name(req_class) ),
46 | fplace_code );
47 | return thing;
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/chektype.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/chektype.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include /* get GVEC_P and BVEC_P */
15 |
16 | #define TYPE_CHECKER(check_name,class_name,test) \
17 | CI_DECL obj check_name( obj thing, int fplace_code ) \
18 | { \
19 | if (!test(thing)) \
20 | type_check_error( thing, class_name, fplace_code ); \
21 | return thing; \
22 | }
23 |
24 | TYPE_CHECKER(check_ptr,"",OBJ_ISA_PTR)
25 | TYPE_CHECKER(check_immob,"",OBJ_ISA_IMMOB)
26 | TYPE_CHECKER(check_fixnum,"",OBJ_ISA_FIXNUM)
27 | TYPE_CHECKER(check_gvec,"",GVEC_P)
28 | TYPE_CHECKER(check_bvec,"",BVEC_P)
29 | TYPE_CHECKER(check_pair,"",PAIR_P)
30 | TYPE_CHECKER(check_symbol,"",SYMBOL_P)
31 | TYPE_CHECKER(check_vector,"",VECTOR_P)
32 | TYPE_CHECKER(check_function,"",FUNCTION_P)
33 | TYPE_CHECKER(check_class,"<>",CLASS_P)
34 | TYPE_CHECKER(check_string,"",STRING_P)
35 | TYPE_CHECKER(check_double_float,"",LONGFLOAT_P)
36 | TYPE_CHECKER(check_long_int,"",LONG_INT_P)
37 | TYPE_CHECKER(check_ascii_char,"",OBJ_ISA_ASCII_CHAR)
38 | TYPE_CHECKER(check_unicode_char,"",OBJ_ISA_UNICODE_CHAR)
39 | TYPE_CHECKER(check_boolean,"",OBJ_ISA_BOOLEAN)
40 |
41 | CI_DECL obj check_instance( obj thing, obj req_class, int fplace_code )
42 | {
43 | if (!instance_p(thing,req_class))
44 | type_check_error( thing,
45 | symbol_text( class_name(req_class) ),
46 | fplace_code );
47 | return thing;
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
23 |
24 |
31 |
32 |
42 |
43 |
44 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/hashfn.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/hasht/hashfn.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2005-01-20 20:23:42
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HASHFN
15 | #define _H_HASHFN
16 |
17 | #include
18 |
19 | /*
20 | These functions [will] assume that `bytes' is word-aligned
21 | and compute a hash function on an integral number of
22 | words.
23 |
24 | [Actually, for now, they use word operations up to the
25 | last full word, and then mask to strip out unused bytes.
26 | The hash function should be endian transparent, also
27 | (but raw_ci_bytes_hash is very keen on the ASCII char set)
28 | */
29 |
30 | obj raw_bytes_hash( const void *bytes, unsigned length );
31 | obj raw_ci_bytes_hash( const void *bytes, unsigned length );
32 |
33 | obj obj_hash( obj x );
34 | obj obj_hash2( obj x, obj y );
35 | obj rehash_fixnum( obj h0 );
36 |
37 | UINT_32 crc_hash( const void *bytes, UINT_32 length, int case_insense );
38 | UINT_32 crc_hash_unicode( const UINT_16 *p, UINT_32 len );
39 | UINT_32 crc_hash_int( UINT_32 num );
40 | UINT_32 crc_hash_int2( UINT_32 x, UINT_32 y );
41 |
42 | obj hash_unicode_string( obj u_str );
43 |
44 | #define hash_string(str) raw_bytes_hash((const void *)string_text(str),\
45 | string_length(str))
46 | #define hash_string_ci(str) raw_ci_bytes_hash((const void *)string_text(str),\
47 | string_length(str))
48 |
49 | #define NNFIXNUM_MASK (((1UL<<(WORD_SIZE_BITS-1))-1)&~PRIMARY_TAG_MASK)
50 | #define UINT_32_TO_NNHASH(u) OBJ((((u) & NNFIXNUM_MASK) + FIXNUM_TAG))
51 |
52 | #define uint_hash(x) UINT_32_TO_NNHASH( crc_hash_int( (x) ) )
53 | #define uint2_hash(x,y) UINT_32_TO_NNHASH( crc_hash_int2( (x), (y) ) )
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/hashfn.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/hasht/hashfn.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2005-01-20 20:23:42
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_HASHFN
15 | #define _H_HASHFN
16 |
17 | #include
18 |
19 | /*
20 | These functions [will] assume that `bytes' is word-aligned
21 | and compute a hash function on an integral number of
22 | words.
23 |
24 | [Actually, for now, they use word operations up to the
25 | last full word, and then mask to strip out unused bytes.
26 | The hash function should be endian transparent, also
27 | (but raw_ci_bytes_hash is very keen on the ASCII char set)
28 | */
29 |
30 | obj raw_bytes_hash( const void *bytes, unsigned length );
31 | obj raw_ci_bytes_hash( const void *bytes, unsigned length );
32 |
33 | obj obj_hash( obj x );
34 | obj obj_hash2( obj x, obj y );
35 | obj rehash_fixnum( obj h0 );
36 |
37 | UINT_32 crc_hash( const void *bytes, UINT_32 length, int case_insense );
38 | UINT_32 crc_hash_unicode( const UINT_16 *p, UINT_32 len );
39 | UINT_32 crc_hash_int( UINT_32 num );
40 | UINT_32 crc_hash_int2( UINT_32 x, UINT_32 y );
41 |
42 | obj hash_unicode_string( obj u_str );
43 |
44 | #define hash_string(str) raw_bytes_hash((const void *)string_text(str),\
45 | string_length(str))
46 | #define hash_string_ci(str) raw_ci_bytes_hash((const void *)string_text(str),\
47 | string_length(str))
48 |
49 | #define NNFIXNUM_MASK (((1UL<<(WORD_SIZE_BITS-1))-1)&~PRIMARY_TAG_MASK)
50 | #define UINT_32_TO_NNHASH(u) OBJ((((u) & NNFIXNUM_MASK) + FIXNUM_TAG))
51 |
52 | #define uint_hash(x) UINT_32_TO_NNHASH( crc_hash_int( (x) ) )
53 | #define uint2_hash(x,y) UINT_32_TO_NNHASH( crc_hash_int2( (x), (y) ) )
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/stdiox.h:
--------------------------------------------------------------------------------
1 | /**********************************************
2 | THIS FILE WAS AUTOMATICALLY COPIED FROM THE
3 | RSCHEME SOURCE TREE, AND THE ORIGINAL MAY CHANGE.
4 | HENCE, DO NOT MODIFY THIS FILE BY HAND!
5 | RScheme Build (v0.7.3.4-b7u, 2007-05-30)
6 | **********************************************/
7 |
8 | #line 1 "modules/iolib/stdiox.h"
9 | /*-----------------------------------------------------------------*-C-*---
10 | * File: modules/iolib/stdiox.h
11 | *
12 | * Copyright (C)1997 Donovan Kolbly
13 | * as part of the RScheme project, licensed for free use.
14 | * See for the latest information.
15 | *
16 | * File version: 1.8
17 | * File mod date: 2000-12-23 12:50:25
18 | * System build: v0.7.3.4-b7u, 2007-05-30
19 | * Owned by module: iolib
20 | *
21 | *------------------------------------------------------------------------*/
22 |
23 | #ifndef _H_STDIOX
24 | #define _H_STDIOX
25 |
26 | #include
27 |
28 | #define FX_AS_FILE(x) ((FILE *)OBJ_TO_RAW_PTR(x))
29 | #define FILE_AS_FX(f) (RAW_PTR_TO_OBJ(f))
30 |
31 | obj stdiox_fopen( char *path, char *mode );
32 | obj stdiox_popen( char *path, char *mode );
33 | int stdiox_pclose( obj f );
34 | int stdiox_fwrite_str( obj f, obj str );
35 | obj stdiox_fgetc( obj f );
36 | obj stdiox_fgets( obj f );
37 | obj stdiox_fgetln( obj f );
38 | int stdiox_fcanget( obj f );
39 | obj stdiox_fpeekc( obj f );
40 |
41 | #define stdiox_stdin() FILE_AS_FX(stdin)
42 | #define stdiox_stdout() FILE_AS_FX(stdout)
43 | #define stdiox_stderr() FILE_AS_FX(stderr)
44 |
45 | #define stdiox_fclose(x) fclose(FX_AS_FILE(x))
46 | #define stdiox_fflush(x) fflush(FX_AS_FILE(x))
47 | #define stdiox_ftell(x) ftell(FX_AS_FILE(x))
48 | #define stdiox_fseek(x,y,z) fseek(FX_AS_FILE(x),y,z)
49 |
50 | #define stdiox_fread_fill(f,bv,off,ln) fread( (char*)PTR_TO_DATAPTR(bv)+(off),\
51 | 1, (ln), \
52 | FX_AS_FILE(f) )
53 |
54 | #define stdiox_fputc(x,ch) fputc( GET_IMMEDIATE_VALUE(ch), FX_AS_FILE(x) )
55 | #define stdiox_ferror(x) ferror( FX_AS_FILE(x) )
56 | #define stdiox_clearerr(x) clearerr( FX_AS_FILE(x) )
57 | #define stdiox_feof(x) (feof(FX_AS_FILE(x)) ? YES : NO)
58 |
59 | #endif /* _H_STDIOX */
60 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/stdiox.h:
--------------------------------------------------------------------------------
1 | /**********************************************
2 | THIS FILE WAS AUTOMATICALLY COPIED FROM THE
3 | RSCHEME SOURCE TREE, AND THE ORIGINAL MAY CHANGE.
4 | HENCE, DO NOT MODIFY THIS FILE BY HAND!
5 | RScheme Build (v0.7.3.4-b7u, 2007-05-30)
6 | **********************************************/
7 |
8 | #line 1 "modules/iolib/stdiox.h"
9 | /*-----------------------------------------------------------------*-C-*---
10 | * File: modules/iolib/stdiox.h
11 | *
12 | * Copyright (C)1997 Donovan Kolbly
13 | * as part of the RScheme project, licensed for free use.
14 | * See for the latest information.
15 | *
16 | * File version: 1.8
17 | * File mod date: 2000-12-23 12:50:25
18 | * System build: v0.7.3.4-b7u, 2007-05-30
19 | * Owned by module: iolib
20 | *
21 | *------------------------------------------------------------------------*/
22 |
23 | #ifndef _H_STDIOX
24 | #define _H_STDIOX
25 |
26 | #include
27 |
28 | #define FX_AS_FILE(x) ((FILE *)OBJ_TO_RAW_PTR(x))
29 | #define FILE_AS_FX(f) (RAW_PTR_TO_OBJ(f))
30 |
31 | obj stdiox_fopen( char *path, char *mode );
32 | obj stdiox_popen( char *path, char *mode );
33 | int stdiox_pclose( obj f );
34 | int stdiox_fwrite_str( obj f, obj str );
35 | obj stdiox_fgetc( obj f );
36 | obj stdiox_fgets( obj f );
37 | obj stdiox_fgetln( obj f );
38 | int stdiox_fcanget( obj f );
39 | obj stdiox_fpeekc( obj f );
40 |
41 | #define stdiox_stdin() FILE_AS_FX(stdin)
42 | #define stdiox_stdout() FILE_AS_FX(stdout)
43 | #define stdiox_stderr() FILE_AS_FX(stderr)
44 |
45 | #define stdiox_fclose(x) fclose(FX_AS_FILE(x))
46 | #define stdiox_fflush(x) fflush(FX_AS_FILE(x))
47 | #define stdiox_ftell(x) ftell(FX_AS_FILE(x))
48 | #define stdiox_fseek(x,y,z) fseek(FX_AS_FILE(x),y,z)
49 |
50 | #define stdiox_fread_fill(f,bv,off,ln) fread( (char*)PTR_TO_DATAPTR(bv)+(off),\
51 | 1, (ln), \
52 | FX_AS_FILE(f) )
53 |
54 | #define stdiox_fputc(x,ch) fputc( GET_IMMEDIATE_VALUE(ch), FX_AS_FILE(x) )
55 | #define stdiox_ferror(x) ferror( FX_AS_FILE(x) )
56 | #define stdiox_clearerr(x) clearerr( FX_AS_FILE(x) )
57 | #define stdiox_feof(x) (feof(FX_AS_FILE(x)) ? YES : NO)
58 |
59 | #endif /* _H_STDIOX */
60 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/bcextend.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/bci/bcextend.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1997-11-29 23:10:43
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_BCEXTEND
15 | #define _H_BCEXTEND
16 |
17 | #include
18 |
19 | typedef union _RS_bc_datum {
20 | obj obj_val;
21 | IEEE_64 raw_float_val;
22 | char *raw_str_val;
23 | rs_bool raw_bool_val;
24 | INT_32 raw_int_val;
25 | void *raw_ptr_val;
26 | INT_64 raw_int_64_val;
27 | IEEE_32 raw_float_32_val;
28 | } RS_bc_datum;
29 |
30 | /*
31 | on entry
32 | +-------------+
33 | | first arg |
34 | +-------------+
35 | | second arg |
36 | +-------------+
37 | | ... |
38 | +-------------+
39 | | last arg |
40 | args ---> +-------------+
41 |
42 | on exit:
43 | +-------------+
44 | | result |
45 | args ---> +-------------+
46 | */
47 |
48 | typedef UINT_8 *RS_bc_extension_fn( UINT_8 *pc, RS_bc_datum **args );
49 |
50 | /* standard BCI extension codes */
51 |
52 | #define BCI_NO_EXTN (0)
53 | #define BCI_STDIO_EXTN (10) /* iolib (base system) */
54 | #define BCI_OS_EXTN (11) /* syscalls (standard package) */
55 | #define BCI_X11_EXTN (12) /* x11 (package) */
56 |
57 | #define BCI_TKG_EXTN (80) /* from here to BCI_GNU_EXTN reserved for
58 | TKG packages */
59 | #define BCI_GNU_EXTN (100) /* from here to BCI_USER_EXTN reserved
60 | for GNU packages */
61 | #define BCI_USER_EXTN (200) /* everything from here on is reserved for
62 | the user */
63 |
64 | #endif /* _H_BCEXTEND */
65 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/bcextend.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/bci/bcextend.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1997-11-29 23:10:43
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_BCEXTEND
15 | #define _H_BCEXTEND
16 |
17 | #include
18 |
19 | typedef union _RS_bc_datum {
20 | obj obj_val;
21 | IEEE_64 raw_float_val;
22 | char *raw_str_val;
23 | rs_bool raw_bool_val;
24 | INT_32 raw_int_val;
25 | void *raw_ptr_val;
26 | INT_64 raw_int_64_val;
27 | IEEE_32 raw_float_32_val;
28 | } RS_bc_datum;
29 |
30 | /*
31 | on entry
32 | +-------------+
33 | | first arg |
34 | +-------------+
35 | | second arg |
36 | +-------------+
37 | | ... |
38 | +-------------+
39 | | last arg |
40 | args ---> +-------------+
41 |
42 | on exit:
43 | +-------------+
44 | | result |
45 | args ---> +-------------+
46 | */
47 |
48 | typedef UINT_8 *RS_bc_extension_fn( UINT_8 *pc, RS_bc_datum **args );
49 |
50 | /* standard BCI extension codes */
51 |
52 | #define BCI_NO_EXTN (0)
53 | #define BCI_STDIO_EXTN (10) /* iolib (base system) */
54 | #define BCI_OS_EXTN (11) /* syscalls (standard package) */
55 | #define BCI_X11_EXTN (12) /* x11 (package) */
56 |
57 | #define BCI_TKG_EXTN (80) /* from here to BCI_GNU_EXTN reserved for
58 | TKG packages */
59 | #define BCI_GNU_EXTN (100) /* from here to BCI_USER_EXTN reserved
60 | for GNU packages */
61 | #define BCI_USER_EXTN (200) /* everything from here on is reserved for
62 | the user */
63 |
64 | #endif /* _H_BCEXTEND */
65 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/stakcach.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stakcach.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2005-03-04 21:01:27
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: cached continuation stack implementation
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_STAKCACH
16 | #define _H_STAKCACH
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | #define CACHE_INTERIOR_SIZE (1000)
23 | #define CACHE_SIZE (CACHE_INTERIOR_SIZE+IMPL_ARG_LIMIT)
24 |
25 | extern obj the_stack_cache[CACHE_SIZE];
26 |
27 | #define CACHE_POSN(i) (((UINT_32)(&the_stack_cache[i])) + POINTER_TAG)
28 | #define MAX_FRAME_SIZE (IMPL_ARG_LIMIT+CONT_FIXED)
29 |
30 | #define cache_upper_limit CACHE_POSN(CACHE_SIZE)
31 | #define cache_lower_limit CACHE_POSN(0)
32 | #define cache_lower_margin CACHE_POSN(MAX_FRAME_SIZE)
33 |
34 | CIH_DECL UINT_32 alloc_cache_frame( unsigned num_slots );
35 | CIH_DECL obj *push_cont( jump_addr label, unsigned reg_space );
36 |
37 | CIH_DECL void cache_iterator_reset( void );
38 | CIH_DECL void *cache_iterator_next( void );
39 |
40 | CIH_DECL rs_bool in_stack_cache( obj value );
41 | void flush_stack_cache( void );
42 | void init_stack_cache( void );
43 | unsigned restore_arb( void ); /* restore run-time dep't # regs */
44 | unsigned get_partcont_size( obj cro ); /* figure out how big a frame is */
45 |
46 | #ifdef INLINES
47 | #include
48 | #endif /* INLINES */
49 |
50 | /*
51 | * Note that filling in the partial continuation,
52 | * doesn't require a write barrier because we are only
53 | * filling in the slots of a freshly created partial-continuation
54 | * which is for-sure in the stack cache
55 | */
56 |
57 | #define SET_PARTCONT_REG(reg,value) frame[reg] = value
58 | #define PUSH_PARTCONT_ADDR(addr,space) obj *frame = push_cont(addr,space)
59 | #define PARTCONT_REF(i) (((obj *)(VAL(continuation_reg)-POINTER_TAG))[i])
60 |
61 | #endif /* _H_STAKCACH */
62 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/stakcach.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stakcach.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 2005-03-04 21:01:27
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: cached continuation stack implementation
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_STAKCACH
16 | #define _H_STAKCACH
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | #define CACHE_INTERIOR_SIZE (1000)
23 | #define CACHE_SIZE (CACHE_INTERIOR_SIZE+IMPL_ARG_LIMIT)
24 |
25 | extern obj the_stack_cache[CACHE_SIZE];
26 |
27 | #define CACHE_POSN(i) (((UINT_32)(&the_stack_cache[i])) + POINTER_TAG)
28 | #define MAX_FRAME_SIZE (IMPL_ARG_LIMIT+CONT_FIXED)
29 |
30 | #define cache_upper_limit CACHE_POSN(CACHE_SIZE)
31 | #define cache_lower_limit CACHE_POSN(0)
32 | #define cache_lower_margin CACHE_POSN(MAX_FRAME_SIZE)
33 |
34 | CIH_DECL UINT_32 alloc_cache_frame( unsigned num_slots );
35 | CIH_DECL obj *push_cont( jump_addr label, unsigned reg_space );
36 |
37 | CIH_DECL void cache_iterator_reset( void );
38 | CIH_DECL void *cache_iterator_next( void );
39 |
40 | CIH_DECL rs_bool in_stack_cache( obj value );
41 | void flush_stack_cache( void );
42 | void init_stack_cache( void );
43 | unsigned restore_arb( void ); /* restore run-time dep't # regs */
44 | unsigned get_partcont_size( obj cro ); /* figure out how big a frame is */
45 |
46 | #ifdef INLINES
47 | #include
48 | #endif /* INLINES */
49 |
50 | /*
51 | * Note that filling in the partial continuation,
52 | * doesn't require a write barrier because we are only
53 | * filling in the slots of a freshly created partial-continuation
54 | * which is for-sure in the stack cache
55 | */
56 |
57 | #define SET_PARTCONT_REG(reg,value) frame[reg] = value
58 | #define PUSH_PARTCONT_ADDR(addr,space) obj *frame = push_cont(addr,space)
59 | #define PARTCONT_REF(i) (((obj *)(VAL(continuation_reg)-POINTER_TAG))[i])
60 |
61 | #endif /* _H_STAKCACH */
62 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/stakcach.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stakcach.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1998-10-13 07:54:28
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include
15 |
16 | CI_DECL UINT_32 alloc_cache_frame( unsigned num_slots )
17 | {
18 | UINT_32 cr = VAL(continuation_reg);
19 |
20 | assert( num_slots <= MAX_FRAME_SIZE );
21 |
22 | if (cr < cache_upper_limit)
23 | {
24 | if (cr >= cache_lower_margin)
25 | {
26 | return (cr - SLOT(num_slots));
27 | }
28 | else if (cr >= cache_lower_limit)
29 | flush_stack_cache();
30 | }
31 | return (cache_upper_limit - SLOT(num_slots));
32 | }
33 |
34 | CI_DECL obj *push_cont( jump_addr label, unsigned reg_space )
35 | {
36 | UINT_32 cr = alloc_cache_frame(CONT_FIXED+reg_space);
37 | #define x ((obj *)(cr-POINTER_TAG))
38 |
39 | if (rsprof_active)
40 | rsprof_saves();
41 |
42 | x[0] = envt_reg;
43 | x[1] = literals_reg;
44 | x[2] = JUMP_ADDR_TO_OBJ(label);
45 | x[3] = continuation_reg;
46 | continuation_reg = OBJ(cr);
47 |
48 | return &x[CONT_FIXED];
49 | #undef x
50 | }
51 |
52 | CI_DECL rs_bool in_stack_cache( obj value )
53 | {
54 | if (VAL(value) < cache_upper_limit && VAL(value) >= cache_lower_limit)
55 | return YES;
56 | return NO;
57 | }
58 |
59 |
60 |
61 | CI_DECL void cache_iterator_reset( void )
62 | {
63 | extern obj *cache_iteration;
64 |
65 | cache_iteration = (obj *)(cache_upper_limit - POINTER_TAG);
66 | }
67 |
68 | CI_DECL void *cache_iterator_next( void )
69 | {
70 | obj item, *stop;
71 | UINT_32 cr = VAL(continuation_reg);
72 | extern obj *cache_iteration;
73 |
74 | if (!in_stack_cache(continuation_reg))
75 | return NULL;
76 |
77 | stop = (obj *)(cr - POINTER_TAG);
78 |
79 | while (cache_iteration > stop)
80 | {
81 | item = *--cache_iteration;
82 | if (OBJ_ISA_PTR(item) && !in_stack_cache(item))
83 | {
84 | return PTR_TO_GCPTR(item);
85 | }
86 | }
87 | return NULL;
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/stakcach.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/stakcach.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.6
9 | * File mod date: 1998-10-13 07:54:28
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #include
15 |
16 | CI_DECL UINT_32 alloc_cache_frame( unsigned num_slots )
17 | {
18 | UINT_32 cr = VAL(continuation_reg);
19 |
20 | assert( num_slots <= MAX_FRAME_SIZE );
21 |
22 | if (cr < cache_upper_limit)
23 | {
24 | if (cr >= cache_lower_margin)
25 | {
26 | return (cr - SLOT(num_slots));
27 | }
28 | else if (cr >= cache_lower_limit)
29 | flush_stack_cache();
30 | }
31 | return (cache_upper_limit - SLOT(num_slots));
32 | }
33 |
34 | CI_DECL obj *push_cont( jump_addr label, unsigned reg_space )
35 | {
36 | UINT_32 cr = alloc_cache_frame(CONT_FIXED+reg_space);
37 | #define x ((obj *)(cr-POINTER_TAG))
38 |
39 | if (rsprof_active)
40 | rsprof_saves();
41 |
42 | x[0] = envt_reg;
43 | x[1] = literals_reg;
44 | x[2] = JUMP_ADDR_TO_OBJ(label);
45 | x[3] = continuation_reg;
46 | continuation_reg = OBJ(cr);
47 |
48 | return &x[CONT_FIXED];
49 | #undef x
50 | }
51 |
52 | CI_DECL rs_bool in_stack_cache( obj value )
53 | {
54 | if (VAL(value) < cache_upper_limit && VAL(value) >= cache_lower_limit)
55 | return YES;
56 | return NO;
57 | }
58 |
59 |
60 |
61 | CI_DECL void cache_iterator_reset( void )
62 | {
63 | extern obj *cache_iteration;
64 |
65 | cache_iteration = (obj *)(cache_upper_limit - POINTER_TAG);
66 | }
67 |
68 | CI_DECL void *cache_iterator_next( void )
69 | {
70 | obj item, *stop;
71 | UINT_32 cr = VAL(continuation_reg);
72 | extern obj *cache_iteration;
73 |
74 | if (!in_stack_cache(continuation_reg))
75 | return NULL;
76 |
77 | stop = (obj *)(cr - POINTER_TAG);
78 |
79 | while (cache_iteration > stop)
80 | {
81 | item = *--cache_iteration;
82 | if (OBJ_ISA_PTR(item) && !in_stack_cache(item))
83 | {
84 | return PTR_TO_GCPTR(item);
85 | }
86 | }
87 | return NULL;
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/sizeclas.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/sizeclas.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_SIZECLAS
15 | #define _H_SIZECLAS
16 |
17 | /* there are three sets of size classes
18 | fine granular size classes:
19 | 128 of these, at double-word allocation resolution
20 | 0
21 | coarse granular size classes
22 | 15 of these, at 64 word (256-byte) allocation resolution
23 | starting at 256 words
24 | large object size class
25 | 1 of these, using the underyling library's storage mgmt
26 | (ie, malloc() and free())
27 | */
28 |
29 | /*
30 | (define (sc n b)
31 | (lambda (i)
32 | (list (+ b (* (- i 1) n) 1)
33 | (+ b (* i n)))))
34 |
35 | (define fine (sc 8 0))
36 | (define coarse (sc 256 (* 8 128)))
37 |
38 | */
39 |
40 | #define NUM_FINE_SIZE_CLASSES (128)
41 | #define FINE_SIZE_CLASS_RESOLUTION (8) /* bytes */
42 | #define FINE_SIZE_CLASS_NUM(bytes) \
43 | ((bytes+(FINE_SIZE_CLASS_RESOLUTION-1))\
44 | /FINE_SIZE_CLASS_RESOLUTION)
45 |
46 | #define FINE_SIZE_LIMIT (FINE_SIZE_CLASS_RESOLUTION \
47 | *(NUM_FINE_SIZE_CLASSES-1))
48 |
49 | #define NUM_COARSE_SIZE_CLASSES (15)
50 | #define COARSE_SIZE_CLASS_RESOLUTION (64*4) /* bytes */
51 | #define COARSE_SIZE_CLASS_NUM(bytes) (NUM_FINE_SIZE_CLASSES + \
52 | (bytes-(FINE_SIZE_LIMIT+1)) \
53 | /COARSE_SIZE_CLASS_RESOLUTION)
54 |
55 | #define COARSE_SIZE_LIMIT (FINE_SIZE_LIMIT + \
56 | + (COARSE_SIZE_CLASS_RESOLUTION \
57 | *NUM_COARSE_SIZE_CLASSES))
58 |
59 | #define LARGE_OBJ_SIZE_CLASS_NUM (NUM_FINE_SIZE_CLASSES +\
60 | NUM_COARSE_SIZE_CLASSES)
61 | #define NUM_LOGICAL_SIZE_CLASSES (LARGE_OBJ_SIZE_CLASS_NUM+1)
62 |
63 | #define LOGICAL_SIZE_CLASS_OF(bytes) \
64 | ((((bytes)<=FINE_SIZE_LIMIT)\
65 | ? FINE_SIZE_CLASS_NUM(bytes) \
66 | : (((bytes)<=COARSE_SIZE_LIMIT) \
67 | ? COARSE_SIZE_CLASS_NUM(bytes)\
68 | : LARGE_OBJ_SIZE_CLASS_NUM)))
69 |
70 | #endif /* _H_SIZECLAS */
71 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/sizeclas.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/sizeclas.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:46
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_SIZECLAS
15 | #define _H_SIZECLAS
16 |
17 | /* there are three sets of size classes
18 | fine granular size classes:
19 | 128 of these, at double-word allocation resolution
20 | 0
21 | coarse granular size classes
22 | 15 of these, at 64 word (256-byte) allocation resolution
23 | starting at 256 words
24 | large object size class
25 | 1 of these, using the underyling library's storage mgmt
26 | (ie, malloc() and free())
27 | */
28 |
29 | /*
30 | (define (sc n b)
31 | (lambda (i)
32 | (list (+ b (* (- i 1) n) 1)
33 | (+ b (* i n)))))
34 |
35 | (define fine (sc 8 0))
36 | (define coarse (sc 256 (* 8 128)))
37 |
38 | */
39 |
40 | #define NUM_FINE_SIZE_CLASSES (128)
41 | #define FINE_SIZE_CLASS_RESOLUTION (8) /* bytes */
42 | #define FINE_SIZE_CLASS_NUM(bytes) \
43 | ((bytes+(FINE_SIZE_CLASS_RESOLUTION-1))\
44 | /FINE_SIZE_CLASS_RESOLUTION)
45 |
46 | #define FINE_SIZE_LIMIT (FINE_SIZE_CLASS_RESOLUTION \
47 | *(NUM_FINE_SIZE_CLASSES-1))
48 |
49 | #define NUM_COARSE_SIZE_CLASSES (15)
50 | #define COARSE_SIZE_CLASS_RESOLUTION (64*4) /* bytes */
51 | #define COARSE_SIZE_CLASS_NUM(bytes) (NUM_FINE_SIZE_CLASSES + \
52 | (bytes-(FINE_SIZE_LIMIT+1)) \
53 | /COARSE_SIZE_CLASS_RESOLUTION)
54 |
55 | #define COARSE_SIZE_LIMIT (FINE_SIZE_LIMIT + \
56 | + (COARSE_SIZE_CLASS_RESOLUTION \
57 | *NUM_COARSE_SIZE_CLASSES))
58 |
59 | #define LARGE_OBJ_SIZE_CLASS_NUM (NUM_FINE_SIZE_CLASSES +\
60 | NUM_COARSE_SIZE_CLASSES)
61 | #define NUM_LOGICAL_SIZE_CLASSES (LARGE_OBJ_SIZE_CLASS_NUM+1)
62 |
63 | #define LOGICAL_SIZE_CLASS_OF(bytes) \
64 | ((((bytes)<=FINE_SIZE_LIMIT)\
65 | ? FINE_SIZE_CLASS_NUM(bytes) \
66 | : (((bytes)<=COARSE_SIZE_LIMIT) \
67 | ? COARSE_SIZE_CLASS_NUM(bytes)\
68 | : LARGE_OBJ_SIZE_CLASS_NUM)))
69 |
70 | #endif /* _H_SIZECLAS */
71 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/threads.doc:
--------------------------------------------------------------------------------
1 | (threads (corelib high-scheme tables mathlib objsys low-scheme iolib *scheme* primops precore) (start-thread receive-message! *setup-time* event-manager-time-did-pass make-thread dispatch-to-next-thread *time-slice* mark-thread-ready set-waiting-objects! send-message! set-thread-return-values! total-time run-threads event-manager-no-ready-threads run-threads* set-thread-state! set-thread-name! thread-yield run-thread thread-state switch-to-next-thread thread-msg mark-thread-ready-soon *waiting-queue* set-suspend-count! thread-yield-until-friend waiting-objects thread-return-values set-total-time! leave-user-mode thread-yield-to-friend exit-threads waiting-threads suspend-count *current-thread* time-slice-over thread-name set-waiting-threads!) (("modules/threads/threads.scm" variable *time-slice* ()) ("modules/threads/threads.scm" variable *current-thread* ()) ("modules/threads/threads.scm" variable *setup-time* ()) ("modules/threads/threads.scm" variable *waiting-queue* ()) ("modules/threads/threads.scm" syntax thread-msg ()) ("modules/threads/threads.scm" class ()) ("modules/threads/threads.scm" method write-object ()) ("modules/threads/threads.scm" function make-thread ()) ("modules/threads/threads.scm" method initialize ()) ("modules/threads/threads.scm" function start-thread ()) ("modules/threads/threads.scm" function time-slice-over ()) ("modules/threads/threads.scm" function thread-yield ()) ("modules/threads/threads.scm" function thread-yield-until-friend ()) ("modules/threads/threads.scm" function thread-yield-to-friend ()) ("modules/threads/threads.scm" variable exit-threads ()) ("modules/threads/threads.scm" variable event-manager-time-did-pass ()) ("modules/threads/threads.scm" variable event-manager-no-ready-threads ()) ("modules/threads/threads.scm" function run-threads ()) ("modules/threads/threads.scm" function run-threads* ()) ("modules/threads/threads.scm" function mark-thread-ready ()) ("modules/threads/threads.scm" function mark-thread-ready-soon ()) ("modules/threads/threads.scm" variable *setup-time* ()) ("modules/threads/threads.scm" function leave-user-mode ()) ("modules/threads/threads.scm" function dispatch-to-next-thread ()) ("modules/threads/threads.scm" function run-thread ()) ("modules/threads/threads.scm" function switch-to-next-thread ()) ("modules/threads/messages.scm" class ()) ("modules/threads/messages.scm" function receive-message! ()) ("modules/threads/messages.scm" function send-message! ())))
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/vinsns.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/vinsns.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.11
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _CI_VINSNS
15 | #define _CI_VINSNS
16 |
17 | #include
18 |
19 |
20 | CI_DECL jump_addr apply_tmpl( obj fn, obj tmpl )
21 | {
22 | extern _rs_volatile void apply_error( obj );
23 |
24 | #ifdef RECORD_CALL_CHAIN
25 | extern void register_apply( obj closure );
26 | extern rs_bool do_record_call_chain;
27 | #endif
28 |
29 | if (rsprof_active)
30 | rsprof_mt_calls( fn, tmpl );
31 |
32 | envt_reg = fn;
33 | literals_reg = tmpl;
34 |
35 | #ifdef RECORD_CALL_CHAIN
36 | if (do_record_call_chain)
37 | register_apply( fn );
38 | #endif /* RECORD_CALL_CHAIN */
39 | return OBJ_TO_JUMP_ADDR( gvec_read( literals_reg, SLOT(0) ) );
40 | }
41 |
42 | CI_DECL jump_addr apply( obj fn )
43 | {
44 | /* the APPLY() vinsn has already checking that `fn' is FUNCTION_P */
45 | return apply_tmpl( fn, gvec_read(fn,SLOT(0)) );
46 | }
47 |
48 | /************************ Binding Environments ************************/
49 |
50 | CI_DECL obj enclosing_envt( obj envt )
51 | {
52 | return gvec_read( envt, SLOT(0) );
53 | }
54 |
55 | /************************ Continuations ************************/
56 |
57 | /*
58 | Load most of the registers from the topmost
59 | partial continuation object, and
60 | return the address to continue at.
61 | Note that the argument-passing registers
62 | and the continuation_reg itself are NOT restored.
63 | That is the caller's responsibility
64 |
65 | Note: We don't use gvec_read directly here because
66 | this same function works for the stack cache,
67 | in which case the continuation_reg might not
68 | be a heap pointer (but it has a POINTER_TAG, so it
69 | looks like a pointer)
70 | */
71 |
72 | CI_DECL jump_addr half_restore( void )
73 | {
74 | if (rsprof_active)
75 | rsprof_mt_returns();
76 |
77 | envt_reg = PARTCONT_REF(0);
78 | literals_reg = PARTCONT_REF(1);
79 | return OBJ_TO_JUMP_ADDR( PARTCONT_REF(2) );
80 | }
81 |
82 | #endif /* _CI_VINSNS */
83 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/vinsns.ci:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/vinsns.ci
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.11
9 | * File mod date: 1997-11-29 23:10:53
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _CI_VINSNS
15 | #define _CI_VINSNS
16 |
17 | #include
18 |
19 |
20 | CI_DECL jump_addr apply_tmpl( obj fn, obj tmpl )
21 | {
22 | extern _rs_volatile void apply_error( obj );
23 |
24 | #ifdef RECORD_CALL_CHAIN
25 | extern void register_apply( obj closure );
26 | extern rs_bool do_record_call_chain;
27 | #endif
28 |
29 | if (rsprof_active)
30 | rsprof_mt_calls( fn, tmpl );
31 |
32 | envt_reg = fn;
33 | literals_reg = tmpl;
34 |
35 | #ifdef RECORD_CALL_CHAIN
36 | if (do_record_call_chain)
37 | register_apply( fn );
38 | #endif /* RECORD_CALL_CHAIN */
39 | return OBJ_TO_JUMP_ADDR( gvec_read( literals_reg, SLOT(0) ) );
40 | }
41 |
42 | CI_DECL jump_addr apply( obj fn )
43 | {
44 | /* the APPLY() vinsn has already checking that `fn' is FUNCTION_P */
45 | return apply_tmpl( fn, gvec_read(fn,SLOT(0)) );
46 | }
47 |
48 | /************************ Binding Environments ************************/
49 |
50 | CI_DECL obj enclosing_envt( obj envt )
51 | {
52 | return gvec_read( envt, SLOT(0) );
53 | }
54 |
55 | /************************ Continuations ************************/
56 |
57 | /*
58 | Load most of the registers from the topmost
59 | partial continuation object, and
60 | return the address to continue at.
61 | Note that the argument-passing registers
62 | and the continuation_reg itself are NOT restored.
63 | That is the caller's responsibility
64 |
65 | Note: We don't use gvec_read directly here because
66 | this same function works for the stack cache,
67 | in which case the continuation_reg might not
68 | be a heap pointer (but it has a POINTER_TAG, so it
69 | looks like a pointer)
70 | */
71 |
72 | CI_DECL jump_addr half_restore( void )
73 | {
74 | if (rsprof_active)
75 | rsprof_mt_returns();
76 |
77 | envt_reg = PARTCONT_REF(0);
78 | literals_reg = PARTCONT_REF(1);
79 | return OBJ_TO_JUMP_ADDR( PARTCONT_REF(2) );
80 | }
81 |
82 | #endif /* _CI_VINSNS */
83 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/high_scheme.doc:
--------------------------------------------------------------------------------
1 | (high-scheme (tables corelib mathlib iolib low-scheme objsys *scheme* primops precore) (*image-save-hook* compute-using reduce add-image-save-hook! computed-value delay previous-state remove-image-save-hook! run-hooks done-with-profiling initial-state reduce1 curry final-state next-state define-hook call-with-profiling set-compute-using! current-element set-computed-value! gvec-equal? force rcurry) (("modules/highscm/equality.scm" method eqv? ()) ("modules/highscm/equality.scm" method equal? ()) ("modules/highscm/equality.scm" method equal? ()) ("modules/highscm/equality.scm" method equal? ()) ("modules/highscm/equality.scm" method equal? ()) ("modules/highscm/equality.scm" function gvec-equal? ()) ("modules/highscm/procedur.scm" function reduce ()) ("modules/highscm/procedur.scm" function reduce1 ()) ("modules/highscm/procedur.scm" function curry ()) ("modules/highscm/procedur.scm" function rcurry ()) ("modules/highscm/promise.scm" class ()) ("modules/highscm/promise.scm" method force ()) ("modules/highscm/promise.scm" method force ()) ("modules/highscm/promise.scm" syntax delay ()) ("modules/highscm/promise.scm" method write-object ()) ("modules/highscm/profiler.scm" function call-with-profiling ()) ("modules/highscm/profiler.scm" function done-with-profiling ()) ("modules/highscm/collexn.scm" method initial-state ()) ("modules/highscm/collexn.scm" method next-state ()) ("modules/highscm/collexn.scm" method current-element ()) ("modules/highscm/collexn.scm" method initial-state ()) ("modules/highscm/collexn.scm" method size ()) ("modules/highscm/collexn.scm" method element ()) ("modules/highscm/collexn.scm" method set-element! ()) ("modules/highscm/collexn.scm" method initial-state ()) ("modules/highscm/collexn.scm" method previous-state ()) ("modules/highscm/collexn.scm" method final-state ()) ("modules/highscm/collexn.scm" method next-state ()) ("modules/highscm/collexn.scm" method current-element ()) ("modules/highscm/collexn.scm" method size ()) ("modules/highscm/collexn.scm" method element ()) ("modules/highscm/collexn.scm" method set-element! ()) ("modules/highscm/collexn.scm" method initial-state ()) ("modules/highscm/collexn.scm" method previous-state ()) ("modules/highscm/collexn.scm" method final-state ()) ("modules/highscm/collexn.scm" method next-state ()) ("modules/highscm/collexn.scm" method current-element ()) ("modules/highscm/collexn.scm" method size ()) ("modules/highscm/collexn.scm" method size ()) ("modules/highscm/collexn.scm" method initial-state ()) ("modules/highscm/collexn.scm" method next-state ()) ("modules/highscm/collexn.scm" method current-element ()) ("modules/highscm/hooks.scm" function run-hooks ())))
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/chektype.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/chektype.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 |
15 | CIH_DECL obj check_ptr( obj thing, int fplace_code );
16 | CIH_DECL obj check_immob( obj thing, int fplace_code );
17 | CIH_DECL obj check_fixnum( obj thing, int fplace_code );
18 | CIH_DECL obj check_gvec( obj thing, int fplace_code );
19 | CIH_DECL obj check_bvec( obj thing, int fplace_code );
20 | CIH_DECL obj check_pair( obj thing, int fplace_code );
21 | CIH_DECL obj check_symbol( obj thing, int fplace_code );
22 | CIH_DECL obj check_vector( obj thing, int fplace_code );
23 | CIH_DECL obj check_function( obj thing, int fplace_code );
24 | CIH_DECL obj check_class( obj thing, int fplace_code );
25 | CIH_DECL obj check_string( obj thing, int fplace_code );
26 | CIH_DECL obj check_double_float( obj thing, int fplace_code );
27 | CIH_DECL obj check_long_int( obj thing, int fplace_code );
28 | CIH_DECL obj check_ascii_char( obj thing, int fplace_code );
29 | CIH_DECL obj check_unicode_char( obj thing, int fplace_code );
30 | CIH_DECL obj check_boolean( obj thing, int fplace_code );
31 | CIH_DECL obj check_instance( obj thing, obj req_class, int fplace_code );
32 |
33 | #define CHECK_PTR(x) check_ptr(x,FPLACE_CODE)
34 | #define CHECK_IMMOB(x) check_immob(x,FPLACE_CODE)
35 | #define CHECK_FIXNUM(x) check_fixnum(x,FPLACE_CODE)
36 | #define CHECK_GVEC(x) check_gvec(x,FPLACE_CODE)
37 | #define CHECK_BVEC(x) check_bvec(x,FPLACE_CODE)
38 | #define CHECK_PAIR(x) check_pair(x,FPLACE_CODE)
39 | #define CHECK_SYMBOL(x) check_symbol(x,FPLACE_CODE)
40 | #define CHECK_VECTOR(x) check_vector(x,FPLACE_CODE)
41 | #define CHECK_FUNCTION(x) check_function(x,FPLACE_CODE)
42 | #define CHECK_CLASS(x) check_class(x,FPLACE_CODE)
43 | #define CHECK_STRING(x) check_string(x,FPLACE_CODE)
44 | #define CHECK_DOUBLE_FLOAT(x) check_double_float(x,FPLACE_CODE)
45 | #define CHECK_LONG_INT(x) check_long_int(x,FPLACE_CODE)
46 | #define CHECK_ASCII_CHAR(x) check_ascii_char(x,FPLACE_CODE)
47 | #define CHECK_UNICODE_CHAR(x) check_unicode_char(x,FPLACE_CODE)
48 | #define CHECK_BOOLEAN(x) check_boolean(x,FPLACE_CODE)
49 | #define CHECK_INSTANCE(x,c) check_instance(x,c,FPLACE_CODE)
50 |
51 | #define checked_car(x) pair_car(CHECK_PAIR(x))
52 | #define checked_cdr(x) pair_cdr(CHECK_PAIR(x))
53 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/chektype.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/chektype.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.4
9 | * File mod date: 1997-11-29 23:10:50
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 |
15 | CIH_DECL obj check_ptr( obj thing, int fplace_code );
16 | CIH_DECL obj check_immob( obj thing, int fplace_code );
17 | CIH_DECL obj check_fixnum( obj thing, int fplace_code );
18 | CIH_DECL obj check_gvec( obj thing, int fplace_code );
19 | CIH_DECL obj check_bvec( obj thing, int fplace_code );
20 | CIH_DECL obj check_pair( obj thing, int fplace_code );
21 | CIH_DECL obj check_symbol( obj thing, int fplace_code );
22 | CIH_DECL obj check_vector( obj thing, int fplace_code );
23 | CIH_DECL obj check_function( obj thing, int fplace_code );
24 | CIH_DECL obj check_class( obj thing, int fplace_code );
25 | CIH_DECL obj check_string( obj thing, int fplace_code );
26 | CIH_DECL obj check_double_float( obj thing, int fplace_code );
27 | CIH_DECL obj check_long_int( obj thing, int fplace_code );
28 | CIH_DECL obj check_ascii_char( obj thing, int fplace_code );
29 | CIH_DECL obj check_unicode_char( obj thing, int fplace_code );
30 | CIH_DECL obj check_boolean( obj thing, int fplace_code );
31 | CIH_DECL obj check_instance( obj thing, obj req_class, int fplace_code );
32 |
33 | #define CHECK_PTR(x) check_ptr(x,FPLACE_CODE)
34 | #define CHECK_IMMOB(x) check_immob(x,FPLACE_CODE)
35 | #define CHECK_FIXNUM(x) check_fixnum(x,FPLACE_CODE)
36 | #define CHECK_GVEC(x) check_gvec(x,FPLACE_CODE)
37 | #define CHECK_BVEC(x) check_bvec(x,FPLACE_CODE)
38 | #define CHECK_PAIR(x) check_pair(x,FPLACE_CODE)
39 | #define CHECK_SYMBOL(x) check_symbol(x,FPLACE_CODE)
40 | #define CHECK_VECTOR(x) check_vector(x,FPLACE_CODE)
41 | #define CHECK_FUNCTION(x) check_function(x,FPLACE_CODE)
42 | #define CHECK_CLASS(x) check_class(x,FPLACE_CODE)
43 | #define CHECK_STRING(x) check_string(x,FPLACE_CODE)
44 | #define CHECK_DOUBLE_FLOAT(x) check_double_float(x,FPLACE_CODE)
45 | #define CHECK_LONG_INT(x) check_long_int(x,FPLACE_CODE)
46 | #define CHECK_ASCII_CHAR(x) check_ascii_char(x,FPLACE_CODE)
47 | #define CHECK_UNICODE_CHAR(x) check_unicode_char(x,FPLACE_CODE)
48 | #define CHECK_BOOLEAN(x) check_boolean(x,FPLACE_CODE)
49 | #define CHECK_INSTANCE(x,c) check_instance(x,c,FPLACE_CODE)
50 |
51 | #define checked_car(x) pair_car(CHECK_PAIR(x))
52 | #define checked_cdr(x) pair_cdr(CHECK_PAIR(x))
53 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/intrs.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/intrs.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.13
9 | * File mod date: 2004-03-25 13:28:22
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: Scheme-level interrupt handling
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_INTRS
16 | #define _H_INTRS
17 |
18 | #include
19 |
20 | enum RSSIGNUM {
21 | RSSIG_USER_INTR = 0,
22 | RSSIG_TIMEOUT = 1,
23 | RSSIG_CHILD_EXITED = 2,
24 | RSSIG_FINALIZE = 3,
25 | RSSIG_GC_FLIP = 4,
26 | RSSIG_C_SIGNAL = 5,
27 | RSSIG_CALL0 = 6,
28 | RSSIG_CALL1 = 7,
29 | RSSIG_CALL2 = 8
30 | };
31 |
32 | struct RSSIG_info {
33 | enum RSSIGNUM signum;
34 | union {
35 | struct {
36 | UINT_32 process_id;
37 | int status;
38 | } child_exited;
39 | struct {
40 | int signal_number;
41 | } c_signal;
42 | struct {
43 | obj finalize_list;
44 | UINT_32 count;
45 | } finalize;
46 | struct {
47 | obj proc;
48 | obj data[2];
49 | } call;
50 | } data;
51 | #if TRACE_SIGNAL_LATENCY
52 | struct RSTime queued_time; /* when the signal was queued */
53 | #endif
54 | };
55 |
56 | #define RSSIG_LATENCY_TOLERANCE (2) /* in milliseconds */
57 |
58 | /*
59 | This function gets called to handle an interrupt.
60 |
61 | It should save the state of the currently executing
62 | thread, set up the call to the scheme-level signal handler,
63 | and return its address.
64 |
65 | (It gets called "soon" whenever rssig_ready = YES)
66 | */
67 |
68 | jump_addr dispatch_interrupt( jump_addr would_be_next );
69 |
70 | /*
71 | Initialize interrupts
72 | Install handlers for ^C, etc.
73 | */
74 |
75 | void init_interrupts( void );
76 | void enable_subprocess_capture( void ); /* init SIGCHLD handling */
77 |
78 | int rs_c_signal_num( obj name );
79 | void rs_init_c_signals( void );
80 |
81 | #ifdef __cplusplus
82 | extern "C" {
83 | #endif
84 | void c_signal_catcher( int sig ); /* generic C signal handler
85 | * (enqueues RSSIG_C_SIGNAL + n)
86 | */
87 | #ifdef __cplusplus
88 | }
89 | #endif
90 |
91 | #ifndef cast_to_signal_handler
92 | #define cast_to_signal_handler(x) x
93 | #endif
94 |
95 | #ifdef SIGUSR_HOOKS
96 | extern int sigusr1_flag, sigusr2_flag;
97 | void run_sigusr_hook( int sigusr_num ); /* 1 or 2 */
98 | #endif /* SIGUSR_HOOKS */
99 |
100 | #endif /* _H_INTRS */
101 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/intrs.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/runtime/intrs.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.13
9 | * File mod date: 2004-03-25 13:28:22
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | * Purpose: Scheme-level interrupt handling
13 | *------------------------------------------------------------------------*/
14 |
15 | #ifndef _H_INTRS
16 | #define _H_INTRS
17 |
18 | #include
19 |
20 | enum RSSIGNUM {
21 | RSSIG_USER_INTR = 0,
22 | RSSIG_TIMEOUT = 1,
23 | RSSIG_CHILD_EXITED = 2,
24 | RSSIG_FINALIZE = 3,
25 | RSSIG_GC_FLIP = 4,
26 | RSSIG_C_SIGNAL = 5,
27 | RSSIG_CALL0 = 6,
28 | RSSIG_CALL1 = 7,
29 | RSSIG_CALL2 = 8
30 | };
31 |
32 | struct RSSIG_info {
33 | enum RSSIGNUM signum;
34 | union {
35 | struct {
36 | UINT_32 process_id;
37 | int status;
38 | } child_exited;
39 | struct {
40 | int signal_number;
41 | } c_signal;
42 | struct {
43 | obj finalize_list;
44 | UINT_32 count;
45 | } finalize;
46 | struct {
47 | obj proc;
48 | obj data[2];
49 | } call;
50 | } data;
51 | #if TRACE_SIGNAL_LATENCY
52 | struct RSTime queued_time; /* when the signal was queued */
53 | #endif
54 | };
55 |
56 | #define RSSIG_LATENCY_TOLERANCE (2) /* in milliseconds */
57 |
58 | /*
59 | This function gets called to handle an interrupt.
60 |
61 | It should save the state of the currently executing
62 | thread, set up the call to the scheme-level signal handler,
63 | and return its address.
64 |
65 | (It gets called "soon" whenever rssig_ready = YES)
66 | */
67 |
68 | jump_addr dispatch_interrupt( jump_addr would_be_next );
69 |
70 | /*
71 | Initialize interrupts
72 | Install handlers for ^C, etc.
73 | */
74 |
75 | void init_interrupts( void );
76 | void enable_subprocess_capture( void ); /* init SIGCHLD handling */
77 |
78 | int rs_c_signal_num( obj name );
79 | void rs_init_c_signals( void );
80 |
81 | #ifdef __cplusplus
82 | extern "C" {
83 | #endif
84 | void c_signal_catcher( int sig ); /* generic C signal handler
85 | * (enqueues RSSIG_C_SIGNAL + n)
86 | */
87 | #ifdef __cplusplus
88 | }
89 | #endif
90 |
91 | #ifndef cast_to_signal_handler
92 | #define cast_to_signal_handler(x) x
93 | #endif
94 |
95 | #ifdef SIGUSR_HOOKS
96 | extern int sigusr1_flag, sigusr2_flag;
97 | void run_sigusr_hook( int sigusr_num ); /* 1 or 2 */
98 | #endif /* SIGUSR_HOOKS */
99 |
100 | #endif /* _H_INTRS */
101 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/imagfile.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/heapi/imagfile.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.8
9 | * File mod date: 2003-10-13 13:02:27
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_IMAGFILE
15 | #define _H_IMAGFILE
16 |
17 | #include
18 |
19 | /*
20 | The heap image file looks like:
21 |
22 | +-----------------+
23 | | blank space |
24 | +-----------------+ FILE_HDR_OFFSET
25 | | file |
26 | | header |
27 | +-----------------+ FILE_DATA_OFFSET
28 | | |
29 | : object :
30 | : descriptions :
31 | | |
32 | | |
33 | +-----------------+ load2_offset[LOAD2_CLASS_ONLY]
34 | | |
35 | : objects that :
36 | : only need their :
37 | |classes swizzled |
38 | +-----------------+ load2_offset[LOAD2_GVEC]
39 | | |
40 | : objects that :
41 | : need their :
42 | | slots swizzled |
43 | +-----------------+ load2_offset[LOAD2_BIGNUM]
44 | | |
45 | : bignums :
46 | +-----------------+ load2_offset[LOAD2_TEMPLATE]
47 | | |
48 | : templates :
49 | +-----------------+ load2_offset[LOAD2_PARTCONT]
50 | | |
51 | : part.conts :
52 | +-----------------+
53 |
54 | */
55 |
56 | #define FILE_HDR_OFFSET (128)
57 | #define FILE_DATA_OFFSET (FILE_HDR_OFFSET + sizeof(struct file_header))
58 |
59 | enum load1_mode {
60 | LOAD1_REF,
61 | LOAD1_SYMBOL,
62 | LOAD1_PART,
63 | LOAD1_ARRAY8,
64 | LOAD1_ARRAY16,
65 | LOAD1_ARRAY32,
66 | LOAD1_ARRAY64,
67 | LOAD1_BIGNUM
68 | };
69 |
70 | enum load2_mode {
71 | LOAD2_NOP,
72 | LOAD2_CLASS_ONLY,
73 | LOAD2_GVEC,
74 | LOAD2_TEMPLATE,
75 | LOAD2_PARTCONT,
76 | LOAD2_MIXVEC_2,
77 | LOAD2_BIGNUM
78 | };
79 |
80 | #define NUM_LOAD2_MODES (10)
81 | #define IMAGE_MAGIC_NUMBER (0x455A646B) /* EZdk */
82 | #define IMAGE_VERSION_NUMBER (2)
83 | #define IMAGE_VERSION_06 (3)
84 | #define IMAGE_VERSION_06_BOOT (4)
85 |
86 | struct file_header {
87 | XUINT_32 magic;
88 | /* IMAGE_MAGIC_NUMBER */
89 | XUINT_32 version;
90 | /* IMAGE_VERSION_NUMBER */
91 |
92 | XUINT_32 load2_offset[NUM_LOAD2_MODES];
93 | /* offset to the list of objects
94 | to be swizzled in the given mode */
95 |
96 | XUINT_32 load2_count[NUM_LOAD2_MODES];
97 | /* number of objects
98 | to be swizzled in the given mode */
99 |
100 | XUINT_32 entry_object_offt;
101 | /* entry point */
102 | XUINT_32 num_objects;
103 | /* number of object names in file */
104 | XUINT_32 data_area_length;
105 | /* bytes taken up by data section */
106 | };
107 |
108 | #endif /* _H_IMAGFILE */
109 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/imagfile.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/heapi/imagfile.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.8
9 | * File mod date: 2003-10-13 13:02:27
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_IMAGFILE
15 | #define _H_IMAGFILE
16 |
17 | #include
18 |
19 | /*
20 | The heap image file looks like:
21 |
22 | +-----------------+
23 | | blank space |
24 | +-----------------+ FILE_HDR_OFFSET
25 | | file |
26 | | header |
27 | +-----------------+ FILE_DATA_OFFSET
28 | | |
29 | : object :
30 | : descriptions :
31 | | |
32 | | |
33 | +-----------------+ load2_offset[LOAD2_CLASS_ONLY]
34 | | |
35 | : objects that :
36 | : only need their :
37 | |classes swizzled |
38 | +-----------------+ load2_offset[LOAD2_GVEC]
39 | | |
40 | : objects that :
41 | : need their :
42 | | slots swizzled |
43 | +-----------------+ load2_offset[LOAD2_BIGNUM]
44 | | |
45 | : bignums :
46 | +-----------------+ load2_offset[LOAD2_TEMPLATE]
47 | | |
48 | : templates :
49 | +-----------------+ load2_offset[LOAD2_PARTCONT]
50 | | |
51 | : part.conts :
52 | +-----------------+
53 |
54 | */
55 |
56 | #define FILE_HDR_OFFSET (128)
57 | #define FILE_DATA_OFFSET (FILE_HDR_OFFSET + sizeof(struct file_header))
58 |
59 | enum load1_mode {
60 | LOAD1_REF,
61 | LOAD1_SYMBOL,
62 | LOAD1_PART,
63 | LOAD1_ARRAY8,
64 | LOAD1_ARRAY16,
65 | LOAD1_ARRAY32,
66 | LOAD1_ARRAY64,
67 | LOAD1_BIGNUM
68 | };
69 |
70 | enum load2_mode {
71 | LOAD2_NOP,
72 | LOAD2_CLASS_ONLY,
73 | LOAD2_GVEC,
74 | LOAD2_TEMPLATE,
75 | LOAD2_PARTCONT,
76 | LOAD2_MIXVEC_2,
77 | LOAD2_BIGNUM
78 | };
79 |
80 | #define NUM_LOAD2_MODES (10)
81 | #define IMAGE_MAGIC_NUMBER (0x455A646B) /* EZdk */
82 | #define IMAGE_VERSION_NUMBER (2)
83 | #define IMAGE_VERSION_06 (3)
84 | #define IMAGE_VERSION_06_BOOT (4)
85 |
86 | struct file_header {
87 | XUINT_32 magic;
88 | /* IMAGE_MAGIC_NUMBER */
89 | XUINT_32 version;
90 | /* IMAGE_VERSION_NUMBER */
91 |
92 | XUINT_32 load2_offset[NUM_LOAD2_MODES];
93 | /* offset to the list of objects
94 | to be swizzled in the given mode */
95 |
96 | XUINT_32 load2_count[NUM_LOAD2_MODES];
97 | /* number of objects
98 | to be swizzled in the given mode */
99 |
100 | XUINT_32 entry_object_offt;
101 | /* entry point */
102 | XUINT_32 num_objects;
103 | /* number of object names in file */
104 | XUINT_32 data_area_length;
105 | /* bytes taken up by data section */
106 | };
107 |
108 | #endif /* _H_IMAGFILE */
109 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/arm/rscheme/gcserver.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcserver.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 1998-12-04 10:37:36
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_GCSERVER
15 | #define _H_GCSERVER
16 |
17 | #define GC_IRC
18 |
19 | #include
20 |
21 | typedef struct IRC_Header *gc_obj_addr;
22 |
23 | typedef struct IRC_Heap IRC_Heap;
24 |
25 | /*
26 | define the basic interface
27 | */
28 |
29 | IRC_Heap *IRC_newHeap( void );
30 |
31 | /*
32 | some of these functions get shadowed by macros
33 | with the same name when GC_MACROS is defined
34 | */
35 |
36 | void *IRC_alloc( IRC_Heap *heap, UINT_32 bytes );
37 | void *IRC_allocFromSizeClass( IRC_Heap *heap, UINT_32 bytes, int sc );
38 |
39 | int IRC_logicalSizeClassOf( UINT_32 bytes );
40 |
41 | int IRC_writeBarrier( IRC_Heap *heap,
42 | void *lvalue, UINT_32 offset,
43 | void *rvalue );
44 | int IRC_tripWriteBarrier( IRC_Heap *heap,
45 | void *lvalue, UINT_32 offset,
46 | void *rvalue );
47 | void IRC_clientWriteViolation( IRC_Heap *heap, void *item, UINT_32 offset );
48 |
49 | /***************************************************/
50 | /* a safe point to do garbage collection
51 | returns a bound on how much allocation we should
52 | do before calling safePoint again to maintain
53 | a good distribution of work
54 | */
55 |
56 | UINT_32 IRC_safePoint( IRC_Heap *heap );
57 |
58 | /* do a full collection in the youngest numGens generations
59 | (0 = none, 1 = youngest only, etc)
60 | the semantics here are that anything that's actually
61 | unreachable and in one of the collected generations will
62 | be marked dead. this means that any current collection
63 | is finished before starting another, and hence we may do
64 | up to just short of TWO FULL traversals!!
65 | */
66 |
67 | void IRC_fullCollect( IRC_Heap *heap, unsigned numGens );
68 |
69 | /*
70 | provide a mapper over the heap objects
71 | */
72 |
73 | int IRC_forEachObject( IRC_Heap *heap,
74 | int (*fn)( void *info, void *heap_obj ),
75 | void *info );
76 |
77 | /*
78 | provide macros for important functions
79 | */
80 | #ifdef GC_MACROS
81 | #include
82 | #include
83 | #include
84 |
85 | #define IRC_alloc(heap,size) \
86 | IRC_getBlock(heap,\
87 | (heap)->sizeClassesIndex[LOGICAL_SIZE_CLASS_OF(size)], \
88 | size)
89 |
90 | #define IRC_writeBarrier(heap,lvalue,offset,rvalue) \
91 | (IRC_writeBarrierCode(heap,lvalue,rvalue) \
92 | ? IRC_tripWriteBarrier( heap, lvalue, offset, rvalue ) \
93 | : 0)
94 | #endif
95 |
96 | #include
97 | #include
98 |
99 | int is_object_dead( void *ptr );
100 |
101 | #endif /* _H_GCSERVER */
102 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/include/x86/rscheme/gcserver.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------*-C-*---
2 | * File: handc/cfg/gc/irc/gcserver.h
3 | *
4 | * Copyright (C)1997 Donovan Kolbly
5 | * as part of the RScheme project, licensed for free use.
6 | * See for the latest information.
7 | *
8 | * File version: 1.7
9 | * File mod date: 1998-12-04 10:37:36
10 | * System build: v0.7.3.4-b7u, 2007-05-30
11 | *
12 | *------------------------------------------------------------------------*/
13 |
14 | #ifndef _H_GCSERVER
15 | #define _H_GCSERVER
16 |
17 | #define GC_IRC
18 |
19 | #include
20 |
21 | typedef struct IRC_Header *gc_obj_addr;
22 |
23 | typedef struct IRC_Heap IRC_Heap;
24 |
25 | /*
26 | define the basic interface
27 | */
28 |
29 | IRC_Heap *IRC_newHeap( void );
30 |
31 | /*
32 | some of these functions get shadowed by macros
33 | with the same name when GC_MACROS is defined
34 | */
35 |
36 | void *IRC_alloc( IRC_Heap *heap, UINT_32 bytes );
37 | void *IRC_allocFromSizeClass( IRC_Heap *heap, UINT_32 bytes, int sc );
38 |
39 | int IRC_logicalSizeClassOf( UINT_32 bytes );
40 |
41 | int IRC_writeBarrier( IRC_Heap *heap,
42 | void *lvalue, UINT_32 offset,
43 | void *rvalue );
44 | int IRC_tripWriteBarrier( IRC_Heap *heap,
45 | void *lvalue, UINT_32 offset,
46 | void *rvalue );
47 | void IRC_clientWriteViolation( IRC_Heap *heap, void *item, UINT_32 offset );
48 |
49 | /***************************************************/
50 | /* a safe point to do garbage collection
51 | returns a bound on how much allocation we should
52 | do before calling safePoint again to maintain
53 | a good distribution of work
54 | */
55 |
56 | UINT_32 IRC_safePoint( IRC_Heap *heap );
57 |
58 | /* do a full collection in the youngest numGens generations
59 | (0 = none, 1 = youngest only, etc)
60 | the semantics here are that anything that's actually
61 | unreachable and in one of the collected generations will
62 | be marked dead. this means that any current collection
63 | is finished before starting another, and hence we may do
64 | up to just short of TWO FULL traversals!!
65 | */
66 |
67 | void IRC_fullCollect( IRC_Heap *heap, unsigned numGens );
68 |
69 | /*
70 | provide a mapper over the heap objects
71 | */
72 |
73 | int IRC_forEachObject( IRC_Heap *heap,
74 | int (*fn)( void *info, void *heap_obj ),
75 | void *info );
76 |
77 | /*
78 | provide macros for important functions
79 | */
80 | #ifdef GC_MACROS
81 | #include
82 | #include
83 | #include
84 |
85 | #define IRC_alloc(heap,size) \
86 | IRC_getBlock(heap,\
87 | (heap)->sizeClassesIndex[LOGICAL_SIZE_CLASS_OF(size)], \
88 | size)
89 |
90 | #define IRC_writeBarrier(heap,lvalue,offset,rvalue) \
91 | (IRC_writeBarrierCode(heap,lvalue,rvalue) \
92 | ? IRC_tripWriteBarrier( heap, lvalue, offset, rvalue ) \
93 | : 0)
94 | #endif
95 |
96 | #include
97 | #include
98 |
99 | int is_object_dead( void *ptr );
100 |
101 | #endif /* _H_GCSERVER */
102 |
--------------------------------------------------------------------------------
/app/src/main/jni/librs/resource/modules/earley.doc:
--------------------------------------------------------------------------------
1 | (earley (corelib mathlib objsys low-scheme tables *scheme* primops precore) ( grammar parse-error-expecting parse-using-grammar terminal-name make-grammar parse-error-at-token) (("modules/earley/parser.scm" syntax gentmprule ()) ("modules/earley/parser.scm" class ()) ("modules/earley/parser.scm" syntax lookup ()) ("modules/earley/parser.scm" class ()) ("modules/earley/parser.scm" class - ()) ("modules/earley/parser.scm" method initialize ()) ("modules/earley/parser.scm" method initialize ()) ("modules/earley/parser.scm" function add-production! ()) ("modules/earley/parser.scm" function pass-envt ()) ("modules/earley/parser.scm" method hash-code-rec ()) ("modules/earley/parser.scm" method hash-code-rec ()) ("modules/earley/parser.scm" method hash-code-rec ()) ("modules/earley/parser.scm" function null-action ()) ("modules/earley/parser.scm" function cons-action ()) ("modules/earley/parser.scm" function multi-list-action ()) ("modules/earley/parser.scm" function list-action ()) ("modules/earley/parser.scm" function unit-action ()) ("modules/earley/parser.scm" function multi-action ()) ("modules/earley/parser.scm" function make-literal-action ()) ("modules/earley/parser.scm" function make-callback-action ()) ("modules/earley/parser.scm" function eval-rule ()) ("modules/earley/parser.scm" function eval-seq ()) ("modules/earley/parser.scm" function make-terminal ()) ("modules/earley/parser.scm" function eval-rhs ()) ("modules/earley/parser.scm" function gen-or-node ()) ("modules/earley/parser.scm" function gen-repeat-node ()) ("modules/earley/parser.scm" function gen-repeat+-node ()) ("modules/earley/parser.scm" function gen-optional-node ()) ("modules/earley/parser.scm" function make-grammar ()) ("modules/earley/parser.scm" class