Ignore:
Timestamp:
Jan 13, 2018, 11:57:43 AM (13 months ago)
Author:
nmedfort
Message:

Pablo support for byte comparisions; LineFeed? kernel processes byte streams directly. Some clean up of PabloBuilder? functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.cpp

    r5706 r5828  
    9191 * @brief replaceAllUsesWith
    9292 ** ------------------------------------------------------------------------------------------------------------- */
    93 void PabloAST::replaceAllUsesWith(PabloAST * const expr) {
     93void PabloAST::replaceAllUsesWith(PabloAST * const expr) noexcept {
    9494    assert (expr);
    9595    if (LLVM_UNLIKELY(this == expr)) {
     
    115115 * @brief addUser
    116116 ** ------------------------------------------------------------------------------------------------------------- */
    117 bool PabloAST::addUser(PabloAST * const user) { assert (user);
     117bool PabloAST::addUser(PabloAST * const user) noexcept {
     118    assert (user);
    118119    const auto p = std::lower_bound(mUsers.begin(), mUsers.end(), user);
    119120    const bool unique = p == mUsers.end() || *p != user;
     
    125126 * @brief removeUser
    126127 ** ------------------------------------------------------------------------------------------------------------- */
    127 bool PabloAST::removeUser(PabloAST * const user) { assert (user);
     128bool PabloAST::removeUser(PabloAST * const user) noexcept {
     129    assert (user);
    128130    const auto p = std::lower_bound(mUsers.begin(), mUsers.end(), user);
    129131    assert (p != mUsers.end() && *p == user);
     
    230232 * @brief removeFromParent
    231233 ** ------------------------------------------------------------------------------------------------------------- */
    232 Statement * Statement::removeFromParent() {
     234Statement * Statement::removeFromParent() noexcept {
    233235    Statement * next = mNext;
    234236    if (LLVM_LIKELY(mParent != nullptr)) {
    235 
    236 
    237 
    238237        if (LLVM_UNLIKELY(mParent->mFirst == this)) {
    239238            mParent->mFirst = mNext;
     
    261260 * @brief eraseFromParent
    262261 ** ------------------------------------------------------------------------------------------------------------- */
    263 Statement * Statement::eraseFromParent(const bool recursively) {
     262Statement * Statement::eraseFromParent(const bool recursively) noexcept {
    264263
    265264    if (LLVM_UNLIKELY(getParent() == nullptr)) {
     
    274273
    275274    Statement * const next = removeFromParent();
    276 
    277275    for (unsigned i = 0; i != mOperands; ++i) {
    278276        PabloAST * const op = mOperand[i]; assert (op);
     
    292290 * @brief replaceWith
    293291 ** ------------------------------------------------------------------------------------------------------------- */
    294 Statement * Statement::replaceWith(PabloAST * const expr, const bool rename, const bool recursively) {
     292Statement * Statement::replaceWith(PabloAST * const expr, const bool rename, const bool recursively) noexcept {
    295293    assert (expr);
    296294    if (LLVM_UNLIKELY(expr == this)) {
     
    319317 * @brief addOperand
    320318 ** ------------------------------------------------------------------------------------------------------------- */
    321 void Variadic::addOperand(PabloAST * const expr) {
     319void Variadic::addOperand(PabloAST * const expr) noexcept {
    322320    if (LLVM_UNLIKELY(mOperands == mCapacity)) {
    323321        mCapacity = std::max<unsigned>(mCapacity * 2, 2);
     
    336334 * @brief removeOperand
    337335 ** ------------------------------------------------------------------------------------------------------------- */
    338 PabloAST * Variadic::removeOperand(const unsigned index) {
     336PabloAST * Variadic::removeOperand(const unsigned index) noexcept {
    339337    assert (index < mOperands);
    340338    PabloAST * const expr = mOperand[index];
Note: See TracChangeset for help on using the changeset viewer.