aboutsummaryrefslogtreecommitdiff
path: root/algorithm.h
AgeCommit message (Collapse)Author
2021-07-25Remove/replace unnecessary includes of logging.h (components/)Hans Wennborg
If the file just needs the CHECK/CHECK_OP/NOTREACHED macros, use the appropriate header for that instead. Or if logging.h is not needed at all, remove it. This is both a nice cleanup (logging.h is a big header, and including it unnecessarily has compile-time costs), and part of the final step towards making logging.h no longer include check.h and the others. Bug: 1031540 Change-Id: Ibeb7cc26e331161c5a1490b84ef5a59ecd122413 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254029 Auto-Submit: Hans Wennborg <hans@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#781841} NOKEYCHECK=True GitOrigin-RevId: 29c74d3fa1a05f3de62c3017b70c4e9e0d7fbbca
2021-07-25[Zucchini] Add helpers for 2 byte and 4 byte alignment.Samuel Huang
This CL adds specialized versions of AlignCeil(): {IncrementForAlignCeil2(), IncrementForAlignCeil4()}. Given a value to be aligned, these functions return an increment that the caller can add to the given value to cause alignment. This scheme admits iterator alignment. e.g., by: aligned_it = it + IncrementForAlignCeil4(it - base_it); These functions will be used by code to add ARM support. Bug: 918867 Change-Id: I6da038a748a29cde82e4c82e597455644213abd9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524920 Reviewed-by: Samuel Huang <huangs@chromium.org> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#641279} NOKEYCHECK=True GitOrigin-RevId: dc2c91d1d1cf5aeac19b25210e470909f175b160
2021-07-23[Zucchini] Introduce bit operations into algorithm.h.Samuel Huang
This CL makes algorithm.h in Chromium match trunk's version. Details: - Add {GetBit(), GetSignedBits(), GetUnsignedBits(), SignedFit()}. These will be used by the ARM Disassembler. - Rename ceil() to AlignCeil() to avoid confusion with ceil() from <cmath>. - Extensive unit tests. - Minor enum type fix in disassembler_win32.h (offset_t should not be used to represent lengths). Change-Id: Icf9ce254bce2e5a3e9c286dbb5a704aeacd8bc35 Reviewed-on: https://chromium-review.googlesource.com/1098556 Reviewed-by: Samuel Huang <huangs@chromium.org> Reviewed-by: Greg Thompson <grt@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#566893} NOKEYCHECK=True GitOrigin-RevId: 2c50b5af45fa271f06317419f6b8bfc5f4a80be0
2021-07-23[Zucchini] Move Zucchini from /chrome/installer/ to /components/.Samuel Huang
(Use "git log --follow" to see older revisions of files). /components/ is the most logical place to put Zucchini, which only depends on /base and /testing/gtest. This move also enables Zucchini to be used by the Component Updater. Details: - Move all files; run the following to change deps and guards: sed 's/chrome\/installer/components/' *.cc *.h -i sed 's/CHROME_INSTALLER/COMPONENTS/' *.cc *.h -i - Sorting works out pretty well! - Change all 'chrome/installer/zucchini' to 'components/zucchini' throughout other parts of the repo; sort if necessary. - Fix 6 'git cl lint' errors. - Change 1 Bind() usage to BindRepeated(). - Update OWNER. Bug: 729154 Change-Id: I50c5a7d411ea85f707b5994ab319dfb2a1acccf7 Reviewed-on: https://chromium-review.googlesource.com/954923 Reviewed-by: Greg Thompson <grt@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Samuel Huang <huangs@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#542857} NOKEYCHECK=True GitOrigin-RevId: 577ef6c435e8d43be6e3e60ccbcbd1881780f4ec