]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
rose: fix up comments referring to CHECK_LITERAL
authorJustin Viiret <justin.viiret@intel.com>
Mon, 28 Nov 2016 22:27:59 +0000 (09:27 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 04:41:29 +0000 (14:41 +1000)
This instruction is now called CHECK_LONG_LIT.

src/rose/rose_build_bytecode.cpp
src/rose/rose_build_compile.cpp
src/rose/stream_long_lit.h

index daf827e9ddcdb8db01d0ae5238ec5b1677941b5a..edf3e5e908e63d534dc4fa7f786d4affdbbd7772 100644 (file)
@@ -216,7 +216,7 @@ struct build_context : boost::noncopyable {
      * written to the engine_blob. */
     vector<u32> 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<ue2_case_string> 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<const RoseInstrCheckLongLit *>(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<const RoseInstrCheckLongLitNocase *>(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<u32> &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);
index 1237a014fc7c81f1f9289729b61e46d20d3449c1..9b8ea7f75ba5d2bd6d34cff4ff0c6a91c9c0cb05 100644 (file)
@@ -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",
index d78e2863552aaeefef5c66bbc5be0a76ba45a01a..0736ec88e2ad14715e98a9fca409ee71bff9bda2 100644 (file)
@@ -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;