-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from randovania/feature/bmsas
Speedup BMSAS
- Loading branch information
Showing
5 changed files
with
119 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import operator | ||
|
||
import construct.expr | ||
|
||
# Workaround construct's bug (See https://github.com/construct/construct/issues/1039) | ||
construct.expr.opnames[operator.and_] = "&" | ||
construct.expr.opnames[operator.or_] = "|" | ||
|
||
|
||
# Hex for some reason doesn't support compilation for building, despite being trivial to do | ||
# So let's hack it in. | ||
def _hex_emitbuild(self, code): | ||
return self.subcon._compilebuild(code) | ||
|
||
|
||
construct.Hex._emitbuild = _hex_emitbuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters