Add basic support of 'break' and 'continue' statements (without identifiers)

This commit is contained in:
Ilmir Usmanov
2014-08-04 17:09:02 +04:00
parent 59403ac7f2
commit eee88ffdc2
3 changed files with 327 additions and 115 deletions
+2 -1
View File
@@ -18,6 +18,7 @@
#include "globals.h"
#include "opcodes.h"
#include "interpreter.h"
void serializer_init (bool show_opcodes);
@@ -27,7 +28,7 @@ void serializer_dump_nums (const int32_t *, uint8_t, uint16_t, uint8_t);
void serializer_dump_opcode (OPCODE);
void serializer_rewrite_opcode (const uint8_t, OPCODE);
void serializer_rewrite_opcode (const opcode_counter_t, OPCODE);
void serializer_print_opcodes (void);
+2 -2
View File
@@ -128,7 +128,7 @@ serializer_dump_nums (const int32_t nums[], uint8_t size, uint16_t offset, uint8
#endif
}
static int32_t opcode_counter = 0;
static opcode_counter_t opcode_counter = 0;
void
serializer_dump_opcode (OPCODE opcode)
@@ -152,7 +152,7 @@ serializer_dump_opcode (OPCODE opcode)
}
void
serializer_rewrite_opcode (const uint8_t loc, OPCODE opcode)
serializer_rewrite_opcode (const opcode_counter_t loc, OPCODE opcode)
{
uint8_t i;
uint8_t opcode_num = opcode.op_idx;