From 5c9c54042442ae5df476643e562a98ab86303c0f Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Tue, 29 Nov 2016 09:27:59 +1100 Subject: [PATCH] rose: fix up comments referring to CHECK_LITERAL This instruction is now called CHECK_LONG_LIT. --- src/rose/rose_build_bytecode.cpp | 8 ++++---- src/rose/rose_build_compile.cpp | 4 ++-- src/rose/stream_long_lit.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/rose/rose_build_bytecode.cpp b/src/rose/rose_build_bytecode.cpp index daf827e9..edf3e5e9 100644 --- a/src/rose/rose_build_bytecode.cpp +++ b/src/rose/rose_build_bytecode.cpp @@ -216,7 +216,7 @@ struct build_context : boost::noncopyable { * written to the engine_blob. */ vector litPrograms; - /** \brief List of long literals (ones with CHECK_LITERAL instructions) + /** \brief List of long literals (ones with CHECK_LONG_LIT instructions) * that need hash table support. */ vector longLiterals; @@ -2595,14 +2595,14 @@ void recordLongLiterals(build_context &bc, const RoseProgram &program) { for (const auto &ri : program) { if (const auto *ri_check = dynamic_cast(ri.get())) { - DEBUG_PRINTF("found CHECK_LITERAL for string '%s'\n", + DEBUG_PRINTF("found CHECK_LONG_LIT for string '%s'\n", escapeString(ri_check->literal).c_str()); bc.longLiterals.emplace_back(ri_check->literal, false); continue; } if (const auto *ri_check = dynamic_cast(ri.get())) { - DEBUG_PRINTF("found CHECK_LITERAL_NOCASE for string '%s'\n", + DEBUG_PRINTF("found CHECK_LONG_LIT_NOCASE for string '%s'\n", escapeString(ri_check->literal).c_str()); bc.longLiterals.emplace_back(ri_check->literal, true); } @@ -4974,7 +4974,7 @@ void allocateFinalIdToSet(RoseBuildImpl &build, const set &lits, goto assign_new_id; } - // Long literals (that require CHECK_LITERAL instructions) cannot be + // Long literals (that require CHECK_LONG_LIT instructions) cannot be // merged. if (lit.s.length() > longLitLengthThreshold) { DEBUG_PRINTF("id %u is a long literal\n", int_id); diff --git a/src/rose/rose_build_compile.cpp b/src/rose/rose_build_compile.cpp index 1237a014..9b8ea7f7 100644 --- a/src/rose/rose_build_compile.cpp +++ b/src/rose/rose_build_compile.cpp @@ -120,9 +120,9 @@ void RoseBuildImpl::handleMixedSensitivity(void) { } // We don't want to explode long literals, as they require confirmation - // with a CHECK_LITERAL instruction and need unique final_ids. + // with a CHECK_LONG_LIT instruction and need unique final_ids. // TODO: we could allow explosion for literals where the prefixes - // covered by CHECK_LITERAL are identical. + // covered by CHECK_LONG_LIT are identical. if (lit.s.length() <= ROSE_LONG_LITERAL_THRESHOLD_MIN && limited_explosion(lit.s)) { DEBUG_PRINTF("need to explode existing string '%s'\n", diff --git a/src/rose/stream_long_lit.h b/src/rose/stream_long_lit.h index d78e2863..0736ec88 100644 --- a/src/rose/stream_long_lit.h +++ b/src/rose/stream_long_lit.h @@ -111,7 +111,7 @@ void loadLongLiteralState(const struct RoseEngine *t, char *state, } // If we don't have any long literals in play, these values must point to - // the real history buffer so that CHECK_LITERAL instructions examine the + // the real history buffer so that CHECK_LONG_LIT instructions examine the // history buffer. scratch->tctxt.ll_buf = scratch->core_info.hbuf; scratch->tctxt.ll_len = scratch->core_info.hlen;