All Projects → guxingke → Mini Jvm

guxingke / Mini Jvm

Licence: lgpl-3.0
使用 JDK8 实现 JVM(Java Virtual Machine)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Mini Jvm

Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+393.31%)
Mutual labels:  interpreter, jvm
Lice
A multi-paradigm programming language running on JVM
Stars: ✭ 120 (-78.87%)
Mutual labels:  interpreter, jvm
Kivm
🌟This is a pure C++ implementation of Java Virtual Machine (only Java 8 is supported). Inspired by Hotspot In Action.
Stars: ✭ 137 (-75.88%)
Mutual labels:  interpreter, jvm
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (-96.13%)
Mutual labels:  interpreter, jvm
openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+423.42%)
Mutual labels:  interpreter, jvm
pikt
🎨 Image-based poetic programming language.
Stars: ✭ 72 (-87.32%)
Mutual labels:  interpreter, jvm
kpspemu
PSP Emulator written in Kotlin for JVM, JS and Native. Can work as PWA.
Stars: ✭ 57 (-89.96%)
Mutual labels:  interpreter, jvm
go-jdk
Run JVM-based code in Go efficiently
Stars: ✭ 61 (-89.26%)
Mutual labels:  interpreter, jvm
Bartosz Basics Of Haskell
Code and exercises from Bartosz Milewski's Basics of Haskell Tutorial
Stars: ✭ 483 (-14.96%)
Mutual labels:  interpreter
Jtransc
Bytecode to source converting Java & Kotlin code into JavaScript, C++, D, C#, PHP, AS3, Dart and Haxe and run it everywhere. Also use JVM code in your favourite language as a library.
Stars: ✭ 532 (-6.34%)
Mutual labels:  jvm
Pdf
编程电子书,电子书,编程书籍,包括C,C#,Docker,Elasticsearch,Git,Hadoop,HeadFirst,Java,Javascript,jvm,Kafka,Linux,Maven,MongoDB,MyBatis,MySQL,Netty,Nginx,Python,RabbitMQ,Redis,Scala,Solr,Spark,Spring,SpringBoot,SpringCloud,TCPIP,Tomcat,Zookeeper,人工智能,大数据类,并发编程,数据库类,数据挖掘,新面试题,架构设计,算法系列,计算机类,设计模式,软件测试,重构优化,等更多分类
Stars: ✭ 12,009 (+2014.26%)
Mutual labels:  jvm
Mvikotlin
Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel)
Stars: ✭ 483 (-14.96%)
Mutual labels:  jvm
Notes
📚A Java back-end engineer's study notes https://loveincode.github.io/notes
Stars: ✭ 534 (-5.99%)
Mutual labels:  jvm
Luaj
Lightweight, fast, Java-centric Lua interpreter written for JME and JSE, with string, table, package, math, io, os, debug, coroutine & luajava libraries, JSR-223 bindings, all metatags, weak tables and unique direct lua-to-java-bytecode compiling.
Stars: ✭ 477 (-16.02%)
Mutual labels:  jvm
Minimal
A Delightfully Diminutive Lisp. Implemented in < 1 KB of JavaScript with JSON source, macros, tail-calls, JS interop, error-handling, and more.
Stars: ✭ 560 (-1.41%)
Mutual labels:  interpreter
Gpython
gpython is a python interpreter written in go "batteries not included"
Stars: ✭ 472 (-16.9%)
Mutual labels:  interpreter
Renjin
JVM-based interpreter for the R language for the statistical analysis.
Stars: ✭ 466 (-17.96%)
Mutual labels:  interpreter
Webassemblyjs
Toolchain for WebAssembly
Stars: ✭ 566 (-0.35%)
Mutual labels:  interpreter
Zircon
Zircon is an extensible and user-friendly, multiplatform tile engine.
Stars: ✭ 552 (-2.82%)
Mutual labels:  jvm
Wren
The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.
Stars: ✭ 5,345 (+841.02%)
Mutual labels:  interpreter

Mini-jvm

CircleCIGitHubGitHub commit activityGitHub last commit

使用 Java 8 实现 JVM

特性

元循环(Metacircular)

mini-jvm on mini-jvm on hotspot. 可以在 mini-jvm 里运行 mini-jvm .

$ java -jar jvm-core/target/mini-jvm.jar -jar jvm-core/target/mini-jvm.jar -jar test.jar
# Hello World!

动机

  1. 尝试了解 JVM 原理, Learning by doing
  2. 纸上得来终觉浅, 实践
  3. 用简单的代码帮助 Javaer 理解 JVM

快速体验 [Macos 用户]

Hello world

brew tap guxingke/repo && brew install mini-jvm

cat <<EOF > HelloWorld.java
public class HelloWorld {
  public static void main(String[] args) {
    if (args.length == 0) {
      System.out.println("hello");
      return;
    }

    for(int i = 0; i < args.length; i ++) {
      System.out.println(args[i]);
    }
  }
}
EOF

javac HelloWorld.java

# no args
mini-jvm HelloWold
# => hello

# with program args
mini-jvm HelloWold hello mini-jvm
# =>  hello
# =>  mini-jvm

# 输入 mini-jvm -help 了解更多.

快速体验 [其他操作系统]

需要自行下载打包. Dev

规划

  • Class 文件解析 90%
  • 字节码执行 90%
  • 类加载 90%
  • 方法调用 90%
  • 实例化 90%
  • Native 方法 90%
  • 异常处理 60%
  • self-booting 70%

局限

  1. 不实现 GC
  2. 不实现多线程

变更记录

  • 实现了元循环(Metacircular)
  • 反射特性基本可用
  • 增加简单的调试器 bin/jdb.
  • 支持 Lambda 调用, closure, currying 可用.
  • Hello World 级别可用

个人记录

建议

  • 在JDK1.8.0_121环境下发现编译不过的情况,详情见#25,本项目的目的是学习JVM,为了项目足够小,清晰和易于理解,并不打算做各种适配工作,建议大家在MacOSX,Maven 3.3+,JDK 1.8.0_192+下学习;

联系作者

微信群

加个人微信 `guxingke_`,备注 mini-jvm 拉你进群。

参考

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].