mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-07-13 14:04:44 +03:00
rose: eliminate roseSize, use bytecode_ptr size
This commit is contained in:
parent
820f1432aa
commit
3e5a8c9c90
@ -362,7 +362,7 @@ struct hs_database *build(NG &ng, unsigned int *length) {
|
|||||||
if (!rose) {
|
if (!rose) {
|
||||||
throw CompileError("Unable to generate bytecode.");
|
throw CompileError("Unable to generate bytecode.");
|
||||||
}
|
}
|
||||||
*length = roseSize(rose.get());
|
*length = rose.size();
|
||||||
if (!*length) {
|
if (!*length) {
|
||||||
DEBUG_PRINTF("RoseEngine has zero length\n");
|
DEBUG_PRINTF("RoseEngine has zero length\n");
|
||||||
assert(0);
|
assert(0);
|
||||||
|
@ -134,8 +134,6 @@ std::unique_ptr<RoseBuild> makeRoseBuilder(ReportManager &rm,
|
|||||||
bool roseCheckRose(const RoseInGraph &ig, bool prefilter,
|
bool roseCheckRose(const RoseInGraph &ig, bool prefilter,
|
||||||
const ReportManager &rm, const CompileContext &cc);
|
const ReportManager &rm, const CompileContext &cc);
|
||||||
|
|
||||||
size_t roseSize(const RoseEngine *t);
|
|
||||||
|
|
||||||
/* used by heuristics to determine the small write engine. High numbers are
|
/* used by heuristics to determine the small write engine. High numbers are
|
||||||
* intended to indicate a lightweight rose. */
|
* intended to indicate a lightweight rose. */
|
||||||
u32 roseQuality(const RoseEngine *t);
|
u32 roseQuality(const RoseEngine *t);
|
||||||
|
@ -5603,7 +5603,7 @@ bytecode_ptr<RoseEngine> addSmallWriteEngine(const RoseBuildImpl &build,
|
|||||||
return rose;
|
return rose;
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t mainSize = roseSize(rose.get());
|
const size_t mainSize = rose.size();
|
||||||
const size_t smallWriteSize = smwr_engine.size();
|
const size_t smallWriteSize = smwr_engine.size();
|
||||||
DEBUG_PRINTF("adding smwr engine, size=%zu\n", smallWriteSize);
|
DEBUG_PRINTF("adding smwr engine, size=%zu\n", smallWriteSize);
|
||||||
|
|
||||||
|
@ -239,11 +239,6 @@ unique_ptr<RoseBuild> makeRoseBuilder(ReportManager &rm,
|
|||||||
return ue2::make_unique<RoseBuildImpl>(rm, ssm, smwr, cc, boundary);
|
return ue2::make_unique<RoseBuildImpl>(rm, ssm, smwr, cc, boundary);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t roseSize(const RoseEngine *t) {
|
|
||||||
assert(t);
|
|
||||||
return t->size;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool roseIsPureLiteral(const RoseEngine *t) {
|
bool roseIsPureLiteral(const RoseEngine *t) {
|
||||||
return t->runtimeImpl == ROSE_RUNTIME_PURE_LITERAL;
|
return t->runtimeImpl == ROSE_RUNTIME_PURE_LITERAL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user