+ stackSz <- get
+ locals <- get
+ len <- get
+ bytes <- replicateM (fromIntegral len) get
+ let bytecode = B.pack bytes
+ code = decodeWith readInstructions 0 bytecode
+ excn <- get
+ excs <- replicateM (fromIntegral excn) get
+ nAttrs <- get
+ attrs <- replicateM (fromIntegral nAttrs) get
+ return $ Code stackSz locals len code excn excs nAttrs attrs
+
+readInstructions :: GetState Integer [Instruction]
+readInstructions = do
+ end <- isEmpty
+ if end
+ then return []
+ else do
+ x <- get
+ next <- readInstructions
+ return (x: next)