Replacing 'varg' opcode with 'meta' opcode with corresponding type.

This commit is contained in:
Ruben Ayrapetyan
2014-08-27 19:35:53 +04:00
parent 2feb159fd8
commit d286a93e2c
8 changed files with 90 additions and 99 deletions
+2 -2
View File
@@ -106,8 +106,8 @@ typedef enum
ECMA_COMPLETION_TYPE_THROW, /**< block completed with throw */
ECMA_COMPLETION_TYPE_EXIT, /**< implementation-defined completion type
for finishing script execution */
ECMA_COMPLETION_TYPE_VARG /**< implementation-defined completion type
for varg (argument value specifier opcode) */
ECMA_COMPLETION_TYPE_META /**< implementation-defined completion type
for meta opcode */
} ecma_completion_type_t;
/**
+5 -2
View File
@@ -365,12 +365,11 @@ ecma_copy_completion_value (ecma_completion_value_t value) /**< completion value
void
ecma_free_completion_value (ecma_completion_value_t completion_value) /**< completion value */
{
switch (completion_value.type)
switch ((ecma_completion_type_t)completion_value.type)
{
case ECMA_COMPLETION_TYPE_NORMAL:
case ECMA_COMPLETION_TYPE_THROW:
case ECMA_COMPLETION_TYPE_RETURN:
case ECMA_COMPLETION_TYPE_VARG:
{
ecma_free_value (completion_value.value, true);
break;
@@ -382,6 +381,10 @@ ecma_free_completion_value (ecma_completion_value_t completion_value) /**< compl
JERRY_ASSERT(completion_value.value.value_type == ECMA_TYPE_SIMPLE);
break;
}
case ECMA_COMPLETION_TYPE_META:
{
JERRY_UNREACHABLE ();
}
}
} /* ecma_free_completion_value */