Skip to content

Commit

Permalink
Revert "merge branch jni"
Browse files Browse the repository at this point in the history
This reverts commit 65865cc.
  • Loading branch information
zxh0 committed Oct 14, 2019
1 parent 65865cc commit a8635ce
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 1,488 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ bin
build
out
myjre
*.dylib
/java
33 changes: 0 additions & 33 deletions Makefile

This file was deleted.

32 changes: 1 addition & 31 deletions interpreter/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,7 @@ import (
"github.com/zxh0/jvm.go/vmerrors"
)

func ExecMethod(thread *rtda.Thread, method *heap.Method, args []heap.Slot) heap.Slot {
shimFrame := rtda.NewShimFrame(thread, args)
thread.PushFrame(shimFrame)
thread.InvokeMethod(method)

verbose := thread.VMOptions.VerboseInstr
defer _catchErr(thread) // todo

for {
frame := thread.CurrentFrame()
if frame == shimFrame {
thread.PopFrame()
if frame.IsStackEmpty() {
return heap.EmptySlot
} else {
return frame.Pop()
}
}

thread.PC = frame.NextPC
frame.NextPC++

// fetch & execute instruction
instr := getInstruction(frame.Method, thread.PC)
instr.Execute(frame)
if verbose {
_logInstruction(frame, instr)
}
}
}

// todo
func Loop(thread *rtda.Thread) {
threadObj := thread.JThread()
isDaemon := threadObj != nil && threadObj.GetFieldValue("daemon", "Z").IntValue() == 1
Expand Down
18 changes: 0 additions & 18 deletions jni/alias.go

This file was deleted.

146 changes: 0 additions & 146 deletions jni/env.go

This file was deleted.

45 changes: 0 additions & 45 deletions jni/java_util_TimeZone.go

This file was deleted.

74 changes: 0 additions & 74 deletions jni/utils.go

This file was deleted.

Loading

0 comments on commit a8635ce

Please sign in to comment.