remove leftover dead code
parent
a37eb25d1c
commit
a24f7c9385
|
@ -328,10 +328,6 @@ lookupid:
|
||||||
auto fmt = static_cast<command_impl *>(id)->get_args();
|
auto fmt = static_cast<command_impl *>(id)->get_args();
|
||||||
for (char c: fmt) {
|
for (char c: fmt) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'S':
|
|
||||||
gs.gen_str();
|
|
||||||
numargs++;
|
|
||||||
break;
|
|
||||||
case 's':
|
case 's':
|
||||||
gs.gen_str(std::string_view{});
|
gs.gen_str(std::string_view{});
|
||||||
numargs++;
|
numargs++;
|
||||||
|
@ -353,7 +349,6 @@ lookupid:
|
||||||
numargs++;
|
numargs++;
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
case 'T':
|
|
||||||
case 't':
|
case 't':
|
||||||
gs.gen_null();
|
gs.gen_null();
|
||||||
numargs++;
|
numargs++;
|
||||||
|
|
|
@ -56,7 +56,7 @@ struct codegen_state {
|
||||||
|
|
||||||
std::string_view get_word();
|
std::string_view get_word();
|
||||||
|
|
||||||
void gen_str(std::string_view word) {
|
void gen_str(std::string_view word = std::string_view{}) {
|
||||||
if (word.size() <= 3) {
|
if (word.size() <= 3) {
|
||||||
std::uint32_t op = BC_INST_VAL_INT | BC_RET_STRING;
|
std::uint32_t op = BC_INST_VAL_INT | BC_RET_STRING;
|
||||||
for (size_t i = 0; i < word.size(); ++i) {
|
for (size_t i = 0; i < word.size(); ++i) {
|
||||||
|
@ -78,10 +78,6 @@ struct codegen_state {
|
||||||
code.push_back(u);
|
code.push_back(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gen_str() {
|
|
||||||
code.push_back(BC_INST_VAL_INT | BC_RET_STRING);
|
|
||||||
}
|
|
||||||
|
|
||||||
void gen_null() {
|
void gen_null() {
|
||||||
code.push_back(BC_INST_VAL_INT | BC_RET_NULL);
|
code.push_back(BC_INST_VAL_INT | BC_RET_NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue