* 'typeof' opcode handler. * * See also: ECMA-262 v5, 11.4.3 * * @return ecma value * Returned value must be freed with ecma_free_value */ ecma_value_t opfunc_typeof (ecma_value_t left_value) /**< left value */ { ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
* The Object.prototype object's 'toString' routine * * See also: * ECMA-262 v5, 15.2.4.2 * * @return ecma value * Returned value must be freed with ecma_free_value. */ staticecma_value_t ecma_builtin_object_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { return ecma_builtin_helper_object_to_string (this_arg); } /* ecma_builtin_object_prototype_object_to_string */
* Common implementation of the Object.prototype.toString routine * * See also: * ECMA-262 v5, 15.2.4.2 * * Used by: * - The Object.prototype.toString routine. * - The Array.prototype.toString routine as fallback. * * @return ecma value * Returned value must be freed with ecma_free_value. */
/* Building string "[object #type#]" where type is 'Undefined', 'Null' or one of possible object's classes. The string with null character is maximum 27 characters long. */ constlit_utf8_size_t buffer_size = 27; lit_utf8_byte_t str_buffer[buffer_size];
* The Boolean.prototype object's 'toString' routine * * See also: * ECMA-262 v5, 15.6.4.2 * * @return ecma value * Returned value must be freed with ecma_free_value. */ static ecma_value_t ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
近期评论