Extract binary lvalue operators (#2630)
This patch substitutes all binary lvalue operators with an assigment + the corresponding binary operator. E.g. A += (expression) is pasred as A = A + (expression). Due to this replacement, all the related binary lvalue CBC opcodes can be removed. Also the arithmetic related VM instructions can put their result directly onto the stack, since no more checking is needed. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
e8502fa8cc
commit
93ec226650
@@ -975,6 +975,21 @@ ecma_free_value_if_not_object (ecma_value_t value) /**< value description */
|
||||
}
|
||||
} /* ecma_free_value_if_not_object */
|
||||
|
||||
/**
|
||||
* Free an ecma-value number
|
||||
*/
|
||||
inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_free_number (ecma_value_t value) /**< value description */
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_value_number (value));
|
||||
|
||||
if (ecma_is_value_float_number (value))
|
||||
{
|
||||
ecma_number_t *number_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (value);
|
||||
ecma_dealloc_number (number_p);
|
||||
}
|
||||
} /* ecma_free_number */
|
||||
|
||||
/**
|
||||
* Get the literal id associated with the given ecma_value type.
|
||||
* This operation is equivalent to the JavaScript 'typeof' operator.
|
||||
|
||||
@@ -190,6 +190,7 @@ void ecma_value_assign_number (ecma_value_t *value_p, ecma_number_t ecma_number)
|
||||
void ecma_free_value (ecma_value_t value);
|
||||
void ecma_fast_free_value (ecma_value_t value);
|
||||
void ecma_free_value_if_not_object (ecma_value_t value);
|
||||
void ecma_free_number (ecma_value_t value);
|
||||
lit_magic_string_id_t ecma_get_typeof_lit_id (ecma_value_t value);
|
||||
|
||||
/* ecma-helpers-string.c */
|
||||
|
||||
Reference in New Issue
Block a user