Implementing 'with' opcode; replacing 'end_with' opcode with 'meta' opcode of corresponding type.

This commit is contained in:
Ruben Ayrapetyan
2014-08-27 21:38:53 +04:00
parent f08c242156
commit 5d2b535cec
8 changed files with 93 additions and 14 deletions
+18 -1
View File
@@ -391,7 +391,24 @@ ecma_op_to_string (ecma_value_t value) /**< ecma-value */
ecma_completion_value_t
ecma_op_to_object (ecma_value_t value) /**< ecma-value */
{
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS(value);
switch ((ecma_type_t)value.value_type)
{
case ECMA_TYPE_SIMPLE:
case ECMA_TYPE_NUMBER:
case ECMA_TYPE_STRING:
{
JERRY_UNIMPLEMENTED ();
}
case ECMA_TYPE_OBJECT:
{
return ecma_make_completion_value (ECMA_COMPLETION_TYPE_NORMAL,
ecma_copy_value (value, true),
ECMA_TARGET_ID_RESERVED);
}
}
JERRY_UNREACHABLE ();
} /* ecma_op_to_object */
/**
+3
View File
@@ -36,6 +36,9 @@
ecma_object_t*
ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error type */
{
/* SyntaxError should be treated as an early error */
JERRY_ASSERT (error_type != ECMA_ERROR_SYNTAX);
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS(error_type);
} /* ecma_new_standard_error */