All Projects → 5A59 → Zvm

5A59 / Zvm

Licence: apache-2.0
A lightweight jvm written by python

Programming Languages

python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Zvm

Jikesrvm
Jikes RVM (Research Virtual Machine)
Stars: ✭ 281 (-27.58%)
Mutual labels:  jvm
Java Multi Thread Programming
🏆 《Java多线程编程核心技术》📚(高洪严 著 机械工业出版社) 源码 https://loveincode.github.io/java-multi-thread-programming/
Stars: ✭ 325 (-16.24%)
Mutual labels:  jvm
Reactor Core
Non-Blocking Reactive Foundation for the JVM
Stars: ✭ 3,891 (+902.84%)
Mutual labels:  jvm
Komputation
Komputation is a neural network framework for the Java Virtual Machine written in Kotlin and CUDA C.
Stars: ✭ 295 (-23.97%)
Mutual labels:  jvm
Jvm.go
A toy JVM written in Go
Stars: ✭ 3,374 (+769.59%)
Mutual labels:  jvm
Play Samples
Stars: ✭ 335 (-13.66%)
Mutual labels:  jvm
Maxine Vm
Maxine VM: A meta-circular research VM
Stars: ✭ 274 (-29.38%)
Mutual labels:  jvm
Kotlin Result
A multiplatform Result monad for modelling success or failure operations.
Stars: ✭ 369 (-4.9%)
Mutual labels:  jvm
Dotenv Kotlin
🗝️ Dotenv is a module that loads environment variables from a .env file
Stars: ✭ 326 (-15.98%)
Mutual labels:  jvm
Jvm
JVM written in Rust
Stars: ✭ 346 (-10.82%)
Mutual labels:  jvm
Docs
Java知识总结:MySQL实战45讲,多线程和JVM知识总结,,SpringBoot,SpringCloud,Storm系列,微信小程序开发,ELK,《JAVA核心技术36讲笔记》,《深入理解JVM虚拟机笔记》,《高性能MySQL笔记》,《数据结构与算法》等等
Stars: ✭ 308 (-20.62%)
Mutual labels:  jvm
Idris Jvm
JVM bytecode back end for Idris
Stars: ✭ 317 (-18.3%)
Mutual labels:  jvm
Hexagon
Hexagon is a microservices toolkit written in Kotlin. Its purpose is to ease the building of services (Web applications, APIs or queue consumers) that run inside a cloud platform.
Stars: ✭ 336 (-13.4%)
Mutual labels:  jvm
Meins
a personal and smart journal
Stars: ✭ 288 (-25.77%)
Mutual labels:  jvm
Jruby
JRuby is an implementation of the Ruby language using the JVM.
Stars: ✭ 3,576 (+821.65%)
Mutual labels:  jvm
Talos
Talos Particle Engine
Stars: ✭ 275 (-29.12%)
Mutual labels:  jvm
Friceengine
🎮 JVM game engine based on Swing/JavaFX.
Stars: ✭ 330 (-14.95%)
Mutual labels:  jvm
Blog
个人博客,记录个人总结(见issues)
Stars: ✭ 385 (-0.77%)
Mutual labels:  jvm
Javadeserh2hc
Sample codes written for the Hackers to Hackers Conference magazine 2017 (H2HC).
Stars: ✭ 361 (-6.96%)
Mutual labels:  jvm
Gosu Lang
The Gosu programming language
Stars: ✭ 338 (-12.89%)
Mutual labels:  jvm

Zvm

简介

一款 python 实现的 "超轻量级" jvm 的实现 (其实就是只实现了主要功能)
"完美"运行各种姿势的 HelloWorld

如何使用

方法一:

  1. 在 test 目录下新建 .java 文件,可参考 Main.java (因为重写了一些 jdk,所以需要在这个目录下编译,为什么重写 jdk,因为 jdk 中很多 native 方法,这次又没有实现 native 方法,so sad)
  2. javac 编译
  3. 在 Zvm 目录下运行 python3 Zvm.py test/Main

方法二:
直接工程导入 pycharm 运行 test.py 吧

主要实现部分

class 文件解析
类加载
运行时数据区
指令解释器
基本指令集 (总共 205 条,实现了估计 190 多条吧)
简易 gc
简易线程
简易 jdk 库

可用功能

基本运算 (加减乘除与或位移...)
输出
多线程运算 (但是没有加同步)
类加载,继承,多态
数组操作 (只支持一维数组)
gc (模拟 gc)
异常处理

TODO

代码整理
方法分派采用 vtable
interface
多维数组
native 方法
方法,变量验证
class_loader 读取 jar zip 文件

参考资料

<java 虚拟机规范>
<揭秘 java 虚拟机>
<HotSpot 实战>
<自己动手写 java 虚拟机>
...

运行展示

run1 run2

LAST

enjoy it

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].