Reduce number of operand type handling conditional blocks in byte-code dumper, by extracting them to several separate routines that can be used for most cases, remove getop_* routines from vm.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-08-12 15:21:59 +03:00
parent cbdc48a1fc
commit a00079e8ff
6 changed files with 608 additions and 837 deletions
+9 -2
View File
@@ -24,10 +24,17 @@
#include "lit-id-hash-table.h"
#include "lit-literal.h"
/**
* Intermediate instruction descriptor that additionally to byte-code instruction
* holds information about literals, associated with corresponding arguments
* of the instruction.
*/
typedef struct
{
lit_cpointer_t lit_id[3];
vm_instr_t op;
lit_cpointer_t lit_id[3]; /**< literals, corresponding to arguments
* (NOT_A_LITERAL - if not literal is associated
* with corresponding argument) */
vm_instr_t op; /**< byte-code instruction */
} op_meta;
typedef struct tree_header