Skip to content

Commit

Permalink
JACOBIN-228 Completedy implementation of GETFIELD
Browse files Browse the repository at this point in the history
  • Loading branch information
platypusguy committed May 18, 2023
1 parent 36aa93d commit 162a98f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/jvm/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,12 @@ func runFrame(fs *list.List) error {
"location %d in method %s of class %s\n",
fieldEntry.Type, f.PC, f.MethName, f.ClName)
}

ref := convertInterfaceToPointer(pop(f))
obj := *(*object.Object)(ref)
value := obj.Fields[fieldEntry.Slot].Fvalue
push(f, value)

case PUTFIELD: // 0xB5 place value into an object's field
CPslot := (int(f.Meth[f.PC+1]) * 256) + int(f.Meth[f.PC+2]) // next 2 bytes point to CP entry
f.PC += 2
Expand Down

0 comments on commit 162a98f

Please sign in to comment.