mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
rose: fix up comments referring to CHECK_LITERAL
This instruction is now called CHECK_LONG_LIT.
This commit is contained in:
parent
5061b76901
commit
5c9c540424
@ -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);
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user