Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
bristermitten committed Dec 5, 2023
1 parent d2fb85b commit 458896d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/JVM/Data/Abstract/Instruction.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE UndecidableInstances #-}

{- | High level representation of a JVM instruction, with type-safe arguments and no stack manipulation needed.
This is not a 1-1 mapping to the actual instructions, use 'JVM.Data.Raw.Instruction' for that.
Expand Down
2 changes: 1 addition & 1 deletion src/JVM/Data/Analyse/StackMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ analyseBlockDiff current block = foldl (flip analyseInstruction) current (takeWh
analyseInstruction (InvokeVirtual _ _ md) ba = ba{stack = (StackEntry <$> maybeToList (returnDescriptorType md.return)) <> drop (1 + length md.params) ba.stack}
analyseInstruction (InvokeInterface _ _ md) ba = ba{stack = (StackEntry <$> maybeToList (returnDescriptorType md.return)) <> drop (length md.params) ba.stack}
analyseInstruction (InvokeDynamic _ _ md) ba = ba{stack = (StackEntry <$> maybeToList (returnDescriptorType md.return)) <> drop (1 + length md.params) ba.stack}
analyseInstruction (PutStatic {}) ba = ba{stack = tail ba.stack}
analyseInstruction (PutStatic{}) ba = ba{stack = tail ba.stack}
analyseInstruction (GetField t _ _) ba = ba{stack = StackEntry (classInfoTypeToFieldType t) : tail ba.stack}
analyseInstruction (GetStatic t _ _) ba = ba{stack = StackEntry (classInfoTypeToFieldType t) : ba.stack}
analyseInstruction (Goto _) ba = ba
Expand Down

0 comments on commit 458896d

Please sign in to comment.