Skip to content

Commit

Permalink
JACOBIN-592 Added tracing logic to handling of INVOKESPECIAL and INVO…
Browse files Browse the repository at this point in the history
…KESTATIC
  • Loading branch information
platypusguy committed Nov 2, 2024
1 parent 50fa7c5 commit 32b7ca3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/buildno.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

package config

var BuildNo = 3182
var BuildNo = 3184
10 changes: 10 additions & 0 deletions src/jvm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,11 @@ func doInvokeSpecial(fr *frames.Frame, _ int64) int {
objRef := pop(fr).(*object.Object)
params = append(params, objRef)

if globals.TraceInst {
infoMsg := fmt.Sprintf("G-function: class=%s, meth=%s%s", className, methodName, methodType)
trace.Trace(infoMsg)
}

ret := gfunction.RunGfunction(mtEntry, fr.FrameStack, className, methodName, methodType, &params, true, MainThread.Trace)
if ret != nil {
switch ret.(type) {
Expand Down Expand Up @@ -2222,6 +2227,11 @@ func doInvokestatic(fr *frames.Frame, _ int64) int {
params = append(params, pop(fr))
}

if globals.TraceInst {
infoMsg := fmt.Sprintf("G-function: class=%s, meth=%s%s", className, methodName, methodType)
trace.Trace(infoMsg)
}

// fr.PC += 2 // advance PC for the first two bytes of this bytecode
ret := gfunction.RunGfunction(mtEntry, fr.FrameStack, className, methodName, methodType, &params, false, MainThread.Trace)
if ret != nil {
Expand Down

0 comments on commit 32b7ca3

Please sign in to comment.