dhscanner-bitcode 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+9/−7 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Bitcode: ReturnContent :: Maybe TmpVariable -> ReturnContent
+ Bitcode: ReturnContent :: Maybe Variable -> ReturnContent
- Bitcode: UnopContent :: TmpVariable -> TmpVariable -> UnopContent
+ Bitcode: UnopContent :: Variable -> Variable -> UnopContent
- Bitcode: [returnValue] :: ReturnContent -> Maybe TmpVariable
+ Bitcode: [returnValue] :: ReturnContent -> Maybe Variable
- Bitcode: [unopLhs] :: UnopContent -> TmpVariable
+ Bitcode: [unopLhs] :: UnopContent -> Variable
- Bitcode: [unopOutput] :: UnopContent -> TmpVariable
+ Bitcode: [unopOutput] :: UnopContent -> Variable
Files
- dhscanner-bitcode.cabal +1/−1
- src/Bitcode.hs +8/−6
dhscanner-bitcode.cabal view
@@ -20,7 +20,7 @@ in mind. The commands resemble an abstract RISC-style assembley, motivated by keeping later-phases analyses as simple as possible. -version: 0.1.0.0 +version: 0.1.0.1 license: GPL-3.0-only license-file: LICENSE author: OrenGitHub
src/Bitcode.hs view
@@ -147,8 +147,8 @@ data UnopContent = UnopContent { - unopOutput :: TmpVariable, - unopLhs :: TmpVariable + unopOutput :: Variable, + unopLhs :: Variable } deriving ( Show, Eq, Generic, ToJSON, FromJSON, Ord ) @@ -166,7 +166,7 @@ data ReturnContent = ReturnContent { - returnValue :: Maybe TmpVariable + returnValue :: Maybe Variable } deriving ( Show, Eq, Generic, ToJSON, FromJSON, Ord ) @@ -249,15 +249,17 @@ -- some instructions don't have an output variable -- at any case, there is at most one output (unlike inputs) output :: InstructionContent -> Maybe Variable -output (Unop c) = Just $ TmpVariableCtor $ unopLhs c -output (Assign c) = Just $ assignOutput c +output (Unop c) = Just $ unopOutput c +output (Binop c) = Just $ binopOutput c +output (Assign c) = Just $ assignOutput c +output (FieldRead c) = Just $ fieldReadOutput c +output (SubscriptRead c) = Just $ subscriptReadOutput c output _ = Nothing -- some instructions don't have an input variable -- there can be /multiple/ input variables to an instruction inputs :: InstructionContent -> Set TmpVariable inputs (Call c) = Data.Set.fromList $ callInputs c -inputs (Unop c) = Data.Set.singleton $ unopLhs c inputs _ = Data.Set.empty inputs' :: InstructionContent -> Set Variable