rose: fix up comments referring to CHECK_LITERAL

This instruction is now called CHECK_LONG_LIT.
This commit is contained in:
Justin Viiret 2016-11-29 09:27:59 +11:00 committed by Matthew Barr
parent 5061b76901
commit 5c9c540424
3 changed files with 7 additions and 7 deletions

View File

@ -216,7 +216,7 @@ struct build_context : boost::noncopyable {
* written to the engine_blob. */ * written to the engine_blob. */
vector<u32> litPrograms; 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. */ * that need hash table support. */
vector<ue2_case_string> longLiterals; vector<ue2_case_string> longLiterals;
@ -2595,14 +2595,14 @@ void recordLongLiterals(build_context &bc, const RoseProgram &program) {
for (const auto &ri : program) { for (const auto &ri : program) {
if (const auto *ri_check = if (const auto *ri_check =
dynamic_cast<const RoseInstrCheckLongLit *>(ri.get())) { 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()); escapeString(ri_check->literal).c_str());
bc.longLiterals.emplace_back(ri_check->literal, false); bc.longLiterals.emplace_back(ri_check->literal, false);
continue; continue;
} }
if (const auto *ri_check = if (const auto *ri_check =
dynamic_cast<const RoseInstrCheckLongLitNocase *>(ri.get())) { 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()); escapeString(ri_check->literal).c_str());
bc.longLiterals.emplace_back(ri_check->literal, true); bc.longLiterals.emplace_back(ri_check->literal, true);
} }
@ -4974,7 +4974,7 @@ void allocateFinalIdToSet(RoseBuildImpl &build, const set<u32> &lits,
goto assign_new_id; goto assign_new_id;
} }
// Long literals (that require CHECK_LITERAL instructions) cannot be // Long literals (that require CHECK_LONG_LIT instructions) cannot be
// merged. // merged.
if (lit.s.length() > longLitLengthThreshold) { if (lit.s.length() > longLitLengthThreshold) {
DEBUG_PRINTF("id %u is a long literal\n", int_id); DEBUG_PRINTF("id %u is a long literal\n", int_id);

View File

@ -120,9 +120,9 @@ void RoseBuildImpl::handleMixedSensitivity(void) {
} }
// We don't want to explode long literals, as they require confirmation // 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 // 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 && if (lit.s.length() <= ROSE_LONG_LITERAL_THRESHOLD_MIN &&
limited_explosion(lit.s)) { limited_explosion(lit.s)) {
DEBUG_PRINTF("need to explode existing string '%s'\n", DEBUG_PRINTF("need to explode existing string '%s'\n",

View 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 // 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. // history buffer.
scratch->tctxt.ll_buf = scratch->core_info.hbuf; scratch->tctxt.ll_buf = scratch->core_info.hbuf;
scratch->tctxt.ll_len = scratch->core_info.hlen; scratch->tctxt.ll_len = scratch->core_info.hlen;