├── 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 | 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 |