Skip to content

Instantly share code, notes, and snippets.

@pedro-w
Created December 15, 2017 14:24
Show Gist options
  • Save pedro-w/15b853e861500bbbb326909e5bfeda21 to your computer and use it in GitHub Desktop.
Save pedro-w/15b853e861500bbbb326909e5bfeda21 to your computer and use it in GitHub Desktop.
This one stupid trick
diff --git a/sources/dfmc/modeling/machine-word-primitives.dylan b/sources/dfmc/modeling/machine-word-primitives.dylan
index 54d47432..e2e26c0d 100644
--- a/sources/dfmc/modeling/machine-word-primitives.dylan
+++ b/sources/dfmc/modeling/machine-word-primitives.dylan
@@ -86,7 +86,7 @@ define custom &machine-word-primitive primitive-cast-raw-as-integer
(x :: <raw-machine-word>) => (result :: <integer>)
// Signals an error if the result is too big to be an <integer> ...
let x :: <abstract-integer> = extract-mw-operand-unsigned(x);
- as(<integer>, generic/lsh(x, -2))
+ as(<integer>, generic/ash(x, -2))
end;
define custom &machine-word-primitive primitive-wrap-abstract-integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment