summaryrefslogtreecommitdiff
path: root/src/decomp/instr
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-10-23 16:22:50 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-10-23 18:53:25 (GMT)
commit56f7524c4fd0fc14a509be7689f4820b31564dbc (patch)
tree9c84e11279cd5711a4e0af907ca6160b62317528 /src/decomp/instr
parent3f05bacd4fec23824489b51d964a7ce3565bb85b (diff)
Deleted a level of data to reduce the memory fingerprint.
Diffstat (limited to 'src/decomp/instr')
-rw-r--r--src/decomp/instr/ite.c4
-rw-r--r--src/decomp/instr/keyword.c4
-rw-r--r--src/decomp/instr/switch.c24
3 files changed, 16 insertions, 16 deletions
diff --git a/src/decomp/instr/ite.c b/src/decomp/instr/ite.c
index eedd7b4..b6391d5 100644
--- a/src/decomp/instr/ite.c
+++ b/src/decomp/instr/ite.c
@@ -241,7 +241,7 @@ static GBufferLine *g_ite_instruction_print(const GITEInstruction *instr, GCodeB
{
GBufferLine *result; /* Ligne à retourner */
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "if ", 3, RTT_KEY_WORD);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "if ", 3, RTT_KEY_WORD, NULL);
result = g_dec_instruction_print(G_DEC_INSTRUCTION(instr->cond),
buffer, line, output);
@@ -250,7 +250,7 @@ static GBufferLine *g_ite_instruction_print(const GITEInstruction *instr, GCodeB
if (instr->false_branch != NULL)
{
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "else", 4, RTT_KEY_WORD);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "else", 4, RTT_KEY_WORD, NULL);
result = g_dec_instruction_print(instr->false_branch, buffer, result, output);
}
diff --git a/src/decomp/instr/keyword.c b/src/decomp/instr/keyword.c
index 3ed12fb..aec6897 100644
--- a/src/decomp/instr/keyword.c
+++ b/src/decomp/instr/keyword.c
@@ -148,11 +148,11 @@ static GBufferLine *g_keyword_instruction_print(const GKeywordInstruction *instr
switch (instr->keyword)
{
case DKW_BREAK:
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "break", 5, RTT_KEY_WORD);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "break", 5, RTT_KEY_WORD, NULL);
break;
case DKW_CONTINUE:
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "continue", 8, RTT_KEY_WORD);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "continue", 8, RTT_KEY_WORD, NULL);
break;
}
diff --git a/src/decomp/instr/switch.c b/src/decomp/instr/switch.c
index a01c28c..eb93bb2 100644
--- a/src/decomp/instr/switch.c
+++ b/src/decomp/instr/switch.c
@@ -246,17 +246,17 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr,
size_t i; /* Boucle de parcours #1 */
size_t j; /* Boucle de parcours #2 */
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "switch", 9, RTT_KEY_WORD);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "switch", 9, RTT_KEY_WORD, NULL);
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW);
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "(", 1, RTT_PUNCT);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "(", 1, RTT_PUNCT, NULL);
result = g_dec_instruction_print(G_DEC_INSTRUCTION(instr->value), buffer, line, output);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_PUNCT);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_PUNCT, NULL);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK, NULL);
g_code_buffer_inc_indentation(buffer);
@@ -268,13 +268,13 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr,
{
result = g_code_buffer_append_new_line_fixme(buffer);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "case", 4, RTT_KEY_WORD);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "case", 4, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL);
result = g_dec_instruction_print(G_DEC_INSTRUCTION(instr->cases[i].values[j])
, buffer, result, output);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT, NULL);
}
@@ -288,8 +288,8 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr,
{
result = g_code_buffer_append_new_line_fixme(buffer);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "default", 7, RTT_KEY_WORD);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "default", 7, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT, NULL);
result = g_dec_instruction_print(instr->def_case, buffer, result, output);
@@ -301,7 +301,7 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr,
result = g_code_buffer_append_new_line_fixme(buffer);
- g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK);
+ g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK, NULL);
return result;