Skip to content

Commit af324df

Browse files
committed
Test rawTerm support
1 parent e8f261b commit af324df

File tree

6 files changed

+247
-193
lines changed

6 files changed

+247
-193
lines changed

include/runtime/header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ extern const uint32_t first_inj_tag, last_inj_tag;
411411
bool is_injection(block *);
412412
block *strip_injection(block *);
413413
block *constructKItemInj(void *subject, const char *sort, bool raw_value);
414-
block *constructRawTerm(void *subject, const char *sort);
414+
block *constructRawTerm(void *subject, const char *sort, bool raw_value);
415415
}
416416

417417
std::string floatToString(const floating *);

runtime/util/ConfigurationSerializer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ void serializeTermToFile(
453453

454454
void serializeRawTermToFile(
455455
const char *filename, void *subject, const char *sort) {
456-
block *term = constructRawTerm(subject, sort);
456+
block *term = constructRawTerm(subject, sort, true);
457457

458458
char *data;
459459
size_t size;
@@ -467,7 +467,7 @@ void serializeRawTermToFile(
467467
std::shared_ptr<kllvm::KOREPattern>
468468
sortedTermToKorePattern(block *subject, const char *sort) {
469469
auto is_kitem = (std::string(sort) == "SortKItem{}");
470-
block *term = is_kitem ? subject : constructRawTerm(subject, sort);
470+
block *term = is_kitem ? subject : constructRawTerm(subject, sort, false);
471471

472472
char *data_out;
473473
size_t size_out;

runtime/util/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ block *constructKItemInj(void *subject, const char *sort, bool raw_value) {
2929
return static_cast<block *>(constructCompositePattern(tag, args));
3030
}
3131

32-
block *constructRawTerm(void *subject, const char *sort) {
32+
block *constructRawTerm(void *subject, const char *sort, bool raw_value) {
3333
auto tag = getTagForSymbolName("rawTerm{}");
3434
auto args = std::vector{
35-
static_cast<void *>(constructKItemInj(subject, sort, true))};
35+
static_cast<void *>(constructKItemInj(subject, sort, raw_value))};
3636
return static_cast<block *>(constructCompositePattern(tag, args));
3737
}
3838

0 commit comments

Comments
 (0)