Passing ecma_value_t arguments by const reference instead of by value.
This commit is contained in:
+3
-2
@@ -16,11 +16,11 @@
|
||||
#ifndef JERRY_GLOBALS_H
|
||||
#define JERRY_GLOBALS_H
|
||||
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <float.h>
|
||||
|
||||
/**
|
||||
* Types
|
||||
@@ -126,7 +126,8 @@ extern void __noreturn jerry_unimplemented (const char *comment, const char *fil
|
||||
/**
|
||||
* Mark for unreachable points and unimplemented cases
|
||||
*/
|
||||
extern void jerry_ref_unused_variables (int unused_variables_follow, ...);
|
||||
template<typename... values> extern void jerry_ref_unused_variables (values... unused);
|
||||
|
||||
#if !defined (JERRY_NDEBUG) && defined (__TARGET_HOST)
|
||||
#define JERRY_UNREACHABLE() \
|
||||
do \
|
||||
|
||||
@@ -454,7 +454,7 @@ run_int_loop (int_data_t *int_data)
|
||||
|
||||
ecma_completion_value_t
|
||||
run_int_from_pos (opcode_counter_t start_pos,
|
||||
ecma_value_t this_binding_value,
|
||||
const ecma_value_t& this_binding_value,
|
||||
ecma_object_t *lex_env_p,
|
||||
bool is_strict,
|
||||
bool is_eval_code)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,7 @@ void init_int (const opcode_t* program_p, bool dump_mem_stats);
|
||||
bool run_int (void);
|
||||
ecma_completion_value_t run_int_loop (int_data_t *int_data);
|
||||
ecma_completion_value_t run_int_from_pos (opcode_counter_t start_pos,
|
||||
ecma_value_t this_binding_value,
|
||||
const ecma_value_t& this_binding_value,
|
||||
ecma_object_t *lex_env_p,
|
||||
bool is_strict,
|
||||
bool is_eval_code);
|
||||
|
||||
@@ -45,8 +45,8 @@ static ecma_completion_value_t
|
||||
do_number_arithmetic (int_data_t *int_data, /**< interpreter context */
|
||||
idx_t dst_var_idx, /**< destination variable identifier */
|
||||
number_arithmetic_op op, /**< number arithmetic operation */
|
||||
ecma_value_t left_value, /**< left value */
|
||||
ecma_value_t right_value) /** right value */
|
||||
const ecma_value_t& left_value, /**< left value */
|
||||
const ecma_value_t& right_value) /** right value */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ static ecma_completion_value_t
|
||||
do_number_bitwise_logic (int_data_t *int_data, /**< interpreter context */
|
||||
idx_t dst_var_idx, /**< destination variable identifier */
|
||||
number_bitwise_logic_op op, /**< number bitwise logic operation */
|
||||
ecma_value_t left_value, /**< left value */
|
||||
ecma_value_t right_value) /** right value */
|
||||
const ecma_value_t& left_value, /**< left value */
|
||||
const ecma_value_t& right_value) /** right value */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
bool is_reg_variable (int_data_t *int_data, idx_t var_idx);
|
||||
ecma_completion_value_t get_variable_value (int_data_t *, idx_t, bool);
|
||||
ecma_completion_value_t set_variable_value (int_data_t *, opcode_counter_t, idx_t, ecma_value_t);
|
||||
ecma_completion_value_t set_variable_value (int_data_t *, opcode_counter_t, idx_t, const ecma_value_t&);
|
||||
ecma_completion_value_t fill_varg_list (int_data_t *int_data,
|
||||
ecma_length_t args_number,
|
||||
ecma_value_t args_values[],
|
||||
|
||||
@@ -127,7 +127,7 @@ ecma_completion_value_t
|
||||
set_variable_value (int_data_t *int_data, /**< interpreter context */
|
||||
opcode_counter_t lit_oc, /**< opcode counter for literal */
|
||||
idx_t var_idx, /**< variable identifier */
|
||||
ecma_value_t value) /**< value to set */
|
||||
const ecma_value_t& value) /**< value to set */
|
||||
{
|
||||
ecma_completion_value_t ret_value;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_array_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_array_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_array_prototype_object_to_string */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -54,8 +54,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_array_object_is_array (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< first argument */
|
||||
ecma_builtin_array_object_is_array (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< first argument */
|
||||
{
|
||||
ecma_simple_value_t is_array = ECMA_SIMPLE_VALUE_FALSE;
|
||||
|
||||
@@ -81,8 +81,8 @@ ecma_builtin_array_object_is_array (ecma_value_t this_arg __unused, /**< 'this'
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_array_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
ecma_builtin_array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -95,7 +95,7 @@ ecma_builtin_array_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_array_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_boolean_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value;
|
||||
|
||||
@@ -92,7 +92,7 @@ ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this_arg) /**< thi
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_boolean_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
if (ecma_is_value_boolean (this_arg))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,7 +50,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_boolean_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -75,7 +75,7 @@ ecma_builtin_boolean_dispatch_call (ecma_value_t *arguments_list_p, /**< argumen
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_boolean_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_compact_profile_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_compact_profile_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -63,7 +63,7 @@ ecma_builtin_compact_profile_error_dispatch_call (ecma_value_t *arguments_list_p
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_compact_profile_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_compact_profile_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_error_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_eval_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_eval_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_eval_error_dispatch_call (ecma_value_t *arguments_list_p, /**< argu
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_eval_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_eval_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_function_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_function_prototype_object_to_string */
|
||||
@@ -67,9 +67,9 @@ ecma_builtin_function_prototype_object_to_string (ecma_value_t this_arg) /**< th
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_apply (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< first argument */
|
||||
ecma_value_t arg2) /**< second argument */
|
||||
ecma_builtin_function_prototype_object_apply (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< first argument */
|
||||
const ecma_value_t& arg2) /**< second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_function_prototype_object_apply */
|
||||
@@ -84,8 +84,8 @@ ecma_builtin_function_prototype_object_apply (ecma_value_t this_arg, /**< this a
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_builtin_function_prototype_object_call (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t* arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arguments_list_p, arguments_number);
|
||||
@@ -101,8 +101,8 @@ ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this ar
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_builtin_function_prototype_object_bind (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t* arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arguments_list_p, arguments_number);
|
||||
@@ -114,7 +114,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_function_prototype_dispatch_call (const ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -128,7 +128,7 @@ ecma_builtin_function_prototype_dispatch_call (ecma_value_t *arguments_list_p, /
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_function_prototype_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,7 +48,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_function_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -62,7 +62,7 @@ ecma_builtin_function_dispatch_call (ecma_value_t *arguments_list_p, /**< argume
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_function_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,8 +49,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_eval (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t x) /**< routine's first argument */
|
||||
ecma_builtin_global_object_eval (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& x) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, x);
|
||||
} /* ecma_builtin_global_object_eval */
|
||||
@@ -65,9 +65,9 @@ ecma_builtin_global_object_eval (ecma_value_t this_arg, /**< this argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_parse_int (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t string, /**< routine's first argument */
|
||||
ecma_value_t radix) /**< routine's second argument */
|
||||
ecma_builtin_global_object_parse_int (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& string, /**< routine's first argument */
|
||||
const ecma_value_t& radix) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, string, radix);
|
||||
} /* ecma_builtin_global_object_parse_int */
|
||||
@@ -82,8 +82,8 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg, /**< this argument
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_parse_float (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t string) /**< routine's first argument */
|
||||
ecma_builtin_global_object_parse_float (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& string) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, string);
|
||||
} /* ecma_builtin_global_object_parse_float */
|
||||
@@ -98,8 +98,8 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg, /**< this argumen
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_is_nan (ecma_value_t this_arg __unused, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
ecma_builtin_global_object_is_nan (const ecma_value_t& this_arg __unused, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's first argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -125,8 +125,8 @@ ecma_builtin_global_object_is_nan (ecma_value_t this_arg __unused, /**< this arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_is_finite (ecma_value_t this_arg __unused, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
ecma_builtin_global_object_is_finite (const ecma_value_t& this_arg __unused, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's first argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -153,8 +153,8 @@ ecma_builtin_global_object_is_finite (ecma_value_t this_arg __unused, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_decode_uri (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t encoded_uri) /**< routine's first argument */
|
||||
ecma_builtin_global_object_decode_uri (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& encoded_uri) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, encoded_uri);
|
||||
} /* ecma_builtin_global_object_decode_uri */
|
||||
@@ -169,8 +169,9 @@ ecma_builtin_global_object_decode_uri (ecma_value_t this_arg, /**< this argument
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_decode_uri_component (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t encoded_uri_component) /**< routine's first argument */
|
||||
ecma_builtin_global_object_decode_uri_component (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& encoded_uri_component) /**< routine's
|
||||
* first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, encoded_uri_component);
|
||||
} /* ecma_builtin_global_object_decode_uri_component */
|
||||
@@ -185,8 +186,8 @@ ecma_builtin_global_object_decode_uri_component (ecma_value_t this_arg, /**< thi
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_encode_uri (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t uri) /**< routine's first argument */
|
||||
ecma_builtin_global_object_encode_uri (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& uri) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, uri);
|
||||
} /* ecma_builtin_global_object_encode_uri */
|
||||
@@ -201,8 +202,8 @@ ecma_builtin_global_object_encode_uri (ecma_value_t this_arg, /**< this argument
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_global_object_encode_uri_component (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t uri_component) /**< routine's first argument */
|
||||
ecma_builtin_global_object_encode_uri_component (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& uri_component) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, uri_component);
|
||||
} /* ecma_builtin_global_object_encode_uri_component */
|
||||
|
||||
@@ -32,12 +32,13 @@
|
||||
#define DISPATCH_ROUTINE_ROUTINE_NAME(builtin_underscored_id) \
|
||||
PASTE (PASTE (ecma_builtin_, builtin_underscored_id), _dispatch_routine)
|
||||
|
||||
#define ROUTINE_ARG(n) , ecma_value_t arg ## n
|
||||
#define ROUTINE_ARG_LIST_0 ecma_value_t this_arg
|
||||
#define ROUTINE_ARG(n) , const ecma_value_t& arg ## n
|
||||
#define ROUTINE_ARG_LIST_0 const ecma_value_t& this_arg
|
||||
#define ROUTINE_ARG_LIST_1 ROUTINE_ARG_LIST_0 ROUTINE_ARG(1)
|
||||
#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1 ROUTINE_ARG(2)
|
||||
#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2 ROUTINE_ARG(3)
|
||||
#define ROUTINE_ARG_LIST_NON_FIXED ROUTINE_ARG_LIST_0, ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len
|
||||
#define ROUTINE_ARG_LIST_NON_FIXED ROUTINE_ARG_LIST_0, \
|
||||
const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len
|
||||
#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
|
||||
static ecma_completion_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);
|
||||
#include BUILTIN_INC_HEADER_NAME
|
||||
@@ -275,10 +276,10 @@ ecma_completion_value_t
|
||||
DISPATCH_ROUTINE_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (ecma_magic_string_id_t builtin_routine_id, /**< built-in's
|
||||
routine's
|
||||
name */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument
|
||||
value */
|
||||
ecma_value_t arguments_list [], /**< list of arguments
|
||||
passed to routine */
|
||||
const ecma_value_t& this_arg_value, /**< 'this' argument
|
||||
value */
|
||||
const ecma_value_t arguments_list [], /**< list of arguments
|
||||
passed to routine */
|
||||
ecma_length_t arguments_number) /**< length of
|
||||
arguments' list */
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -55,8 +55,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_abs (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_abs (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -90,8 +90,8 @@ ecma_builtin_math_object_abs (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_acos (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_acos (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_math_object_acos */
|
||||
@@ -106,8 +106,8 @@ ecma_builtin_math_object_acos (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_asin (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_asin (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_math_object_asin */
|
||||
@@ -122,8 +122,8 @@ ecma_builtin_math_object_asin (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_atan (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_atan (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_math_object_atan */
|
||||
@@ -138,9 +138,9 @@ ecma_builtin_math_object_atan (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_atan2 (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg1, /**< first routine's argument */
|
||||
ecma_value_t arg2) /**< second routine's argument */
|
||||
ecma_builtin_math_object_atan2 (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg1, /**< first routine's argument */
|
||||
const ecma_value_t& arg2) /**< second routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_math_object_atan2 */
|
||||
@@ -155,8 +155,8 @@ ecma_builtin_math_object_atan2 (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_ceil (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_ceil (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_math_object_ceil */
|
||||
@@ -171,8 +171,8 @@ ecma_builtin_math_object_ceil (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_cos (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_cos (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -239,8 +239,8 @@ ecma_builtin_math_object_cos (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_exp (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_exp (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -289,8 +289,8 @@ ecma_builtin_math_object_exp (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_floor (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_floor (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_math_object_floor */
|
||||
@@ -305,8 +305,8 @@ ecma_builtin_math_object_floor (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_log (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_log (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -352,8 +352,8 @@ ecma_builtin_math_object_log (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_max (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t args[], /**< arguments list */
|
||||
ecma_builtin_math_object_max (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
@@ -439,8 +439,8 @@ ecma_builtin_math_object_max (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_min (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t args[], /**< arguments list */
|
||||
ecma_builtin_math_object_min (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
@@ -526,9 +526,9 @@ ecma_builtin_math_object_min (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_pow (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg1, /**< first routine's argument */
|
||||
ecma_value_t arg2) /**< second routine's argument */
|
||||
ecma_builtin_math_object_pow (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg1, /**< first routine's argument */
|
||||
const ecma_value_t& arg2) /**< second routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -760,7 +760,7 @@ ecma_builtin_math_object_pow (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_random (ecma_value_t this_arg __unused) /**< 'this' argument */
|
||||
ecma_builtin_math_object_random (const ecma_value_t& this_arg __unused) /**< 'this' argument */
|
||||
{
|
||||
/* Implementation of George Marsaglia's XorShift random number generator */
|
||||
TODO (/* Check for license issues */);
|
||||
@@ -801,8 +801,8 @@ ecma_builtin_math_object_random (ecma_value_t this_arg __unused) /**< 'this' arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_round (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_round (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -855,8 +855,8 @@ ecma_builtin_math_object_round (ecma_value_t this_arg __unused, /**< 'this' argu
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_sin (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_sin (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -923,8 +923,8 @@ ecma_builtin_math_object_sin (ecma_value_t this_arg __unused, /**< 'this' argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_sqrt (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_sqrt (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
@@ -973,8 +973,8 @@ ecma_builtin_math_object_sqrt (ecma_value_t this_arg __unused, /**< 'this' argum
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_math_object_tan (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_math_object_tan (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_math_object_tan */
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_number_prototype_object_to_string (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
ecma_number_t this_arg_number;
|
||||
@@ -112,7 +112,7 @@ ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_number_prototype_object_to_locale_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
return ecma_builtin_number_prototype_object_to_string (this_arg, NULL, 0);
|
||||
} /* ecma_builtin_number_prototype_object_to_locale_string */
|
||||
@@ -127,7 +127,7 @@ ecma_builtin_number_prototype_object_to_locale_string (ecma_value_t this_arg) /*
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_number_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
if (ecma_is_value_number (this_arg))
|
||||
{
|
||||
@@ -167,8 +167,8 @@ ecma_builtin_number_prototype_object_value_of (ecma_value_t this_arg) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_number_prototype_object_to_fixed (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_number_prototype_object_to_fixed */
|
||||
@@ -183,8 +183,8 @@ ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this_arg, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_exponential (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_number_prototype_object_to_exponential (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_number_prototype_object_to_exponential */
|
||||
@@ -199,8 +199,8 @@ ecma_builtin_number_prototype_object_to_exponential (ecma_value_t this_arg, /**<
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_precision (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_number_prototype_object_to_precision (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_number_prototype_object_to_precision */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,7 +50,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_number_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_number_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -78,7 +78,7 @@ ecma_builtin_number_dispatch_call (ecma_value_t *arguments_list_p, /**< argument
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_number_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_number_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_object_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ecma_magic_string_id_t type_string;
|
||||
|
||||
@@ -140,7 +140,7 @@ ecma_builtin_object_prototype_object_to_string (ecma_value_t this_arg) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_object_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
return ecma_op_to_object (this_arg);
|
||||
} /* ecma_builtin_object_prototype_object_value_of */
|
||||
@@ -155,7 +155,7 @@ ecma_builtin_object_prototype_object_value_of (ecma_value_t this_arg) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_object_prototype_object_to_locale_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_object_prototype_object_to_locale_string */
|
||||
@@ -170,8 +170,8 @@ ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this_arg) /*
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< first argument */
|
||||
ecma_builtin_object_prototype_object_has_own_property (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_prototype_object_has_own_property */
|
||||
@@ -186,8 +186,8 @@ ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this_arg, /*
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
ecma_builtin_object_prototype_object_is_prototype_of (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_prototype_object_is_prototype_of */
|
||||
@@ -202,8 +202,8 @@ ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this_arg, /**
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_property_is_enumerable (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
ecma_builtin_object_prototype_object_property_is_enumerable (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's first argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_prototype_object_property_is_enumerable */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,7 +48,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_object_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_object_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -75,7 +75,7 @@ ecma_builtin_object_dispatch_call (ecma_value_t *arguments_list_p, /**< argument
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_object_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_object_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -111,8 +111,8 @@ ecma_builtin_object_dispatch_construct (ecma_value_t *arguments_list_p, /**< arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_get_prototype_of (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_get_prototype_of */
|
||||
@@ -127,8 +127,8 @@ ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this'
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_get_own_property_names (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_get_own_property_names (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_get_own_property_names */
|
||||
@@ -143,8 +143,8 @@ ecma_builtin_object_object_get_own_property_names (ecma_value_t this_arg, /**< '
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_seal (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_seal */
|
||||
@@ -159,8 +159,8 @@ ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_freeze (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_freeze */
|
||||
@@ -175,8 +175,8 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument *
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_prevent_extensions (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_prevent_extensions (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_prevent_extensions */
|
||||
@@ -191,8 +191,8 @@ ecma_builtin_object_object_prevent_extensions (ecma_value_t this_arg, /**< 'this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_is_sealed (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_is_sealed */
|
||||
@@ -207,8 +207,8 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_is_frozen (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_is_frozen */
|
||||
@@ -223,8 +223,8 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_is_extensible (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_is_extensible (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_is_extensible */
|
||||
@@ -239,8 +239,8 @@ ecma_builtin_object_object_is_extensible (ecma_value_t this_arg, /**< 'this' arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_keys (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_object_object_keys (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_object_keys */
|
||||
@@ -255,9 +255,9 @@ ecma_builtin_object_object_keys (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_object_object_get_own_property_descriptor (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_object_object_get_own_property_descriptor */
|
||||
@@ -272,9 +272,9 @@ ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_create (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_object_object_create (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_object_object_create */
|
||||
@@ -289,9 +289,9 @@ ecma_builtin_object_object_create (ecma_value_t this_arg, /**< 'this' argument *
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_object_object_define_properties (const ecma_value_t& this_arg, /**< 'this' argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_object_object_define_properties */
|
||||
@@ -306,10 +306,10 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_object_define_property (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2, /**< routine's second argument */
|
||||
ecma_value_t arg3) /**< routine's third argument */
|
||||
ecma_builtin_object_object_define_property (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2, /**< routine's second argument */
|
||||
const ecma_value_t& arg3) /**< routine's third argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_range_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_range_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_range_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arg
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_range_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_range_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_reference_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_reference_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_reference_error_dispatch_call (ecma_value_t *arguments_list_p, /**<
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_reference_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_reference_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_reference_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
if (ecma_is_value_string (this_arg))
|
||||
{
|
||||
@@ -93,7 +93,7 @@ ecma_builtin_string_prototype_object_to_string (ecma_value_t this_arg) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
return ecma_builtin_string_prototype_object_to_string (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_value_of */
|
||||
@@ -108,8 +108,8 @@ ecma_builtin_string_prototype_object_value_of (ecma_value_t this_arg) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_char_at (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_string_prototype_object_char_at (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_char_at */
|
||||
@@ -124,8 +124,8 @@ ecma_builtin_string_prototype_object_char_at (ecma_value_t this_arg, /**< this a
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_string_prototype_object_char_code_at (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_char_code_at */
|
||||
@@ -140,8 +140,8 @@ ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this_arg, /**< t
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_concat (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t* argument_list_p, /**< arguments list */
|
||||
ecma_builtin_string_prototype_object_concat (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t* argument_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, argument_list_p, arguments_number);
|
||||
@@ -157,9 +157,9 @@ ecma_builtin_string_prototype_object_concat (ecma_value_t this_arg, /**< this ar
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_index_of (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_string_prototype_object_index_of (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_index_of */
|
||||
@@ -174,9 +174,9 @@ ecma_builtin_string_prototype_object_index_of (ecma_value_t this_arg, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_last_index_of (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_string_prototype_object_last_index_of (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_last_index_of */
|
||||
@@ -191,8 +191,8 @@ ecma_builtin_string_prototype_object_last_index_of (ecma_value_t this_arg, /**<
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_string_prototype_object_locale_compare (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_locale_compare */
|
||||
@@ -207,8 +207,8 @@ ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this_arg, /**<
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_match (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_string_prototype_object_match (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_match */
|
||||
@@ -223,9 +223,9 @@ ecma_builtin_string_prototype_object_match (ecma_value_t this_arg, /**< this arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_replace (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_string_prototype_object_replace (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_replace */
|
||||
@@ -240,8 +240,8 @@ ecma_builtin_string_prototype_object_replace (ecma_value_t this_arg, /**< this a
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
ecma_builtin_string_prototype_object_search (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg) /**< routine's argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_search */
|
||||
@@ -256,9 +256,9 @@ ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this ar
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_slice (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_string_prototype_object_slice (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_slice */
|
||||
@@ -273,9 +273,9 @@ ecma_builtin_string_prototype_object_slice (ecma_value_t this_arg, /**< this arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_string_prototype_object_split (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_split */
|
||||
@@ -290,9 +290,9 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_substring (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
ecma_builtin_string_prototype_object_substring (const ecma_value_t& this_arg, /**< this argument */
|
||||
const ecma_value_t& arg1, /**< routine's first argument */
|
||||
const ecma_value_t& arg2) /**< routine's second argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_substring */
|
||||
@@ -307,7 +307,7 @@ ecma_builtin_string_prototype_object_substring (ecma_value_t this_arg, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_lower_case (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_lower_case (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_lower_case */
|
||||
@@ -322,7 +322,7 @@ ecma_builtin_string_prototype_object_to_lower_case (ecma_value_t this_arg) /**<
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_locale_lower_case (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_locale_lower_case (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_locale_lower_case */
|
||||
@@ -337,7 +337,7 @@ ecma_builtin_string_prototype_object_to_locale_lower_case (ecma_value_t this_arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_upper_case (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_upper_case (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_upper_case */
|
||||
@@ -352,7 +352,7 @@ ecma_builtin_string_prototype_object_to_upper_case (ecma_value_t this_arg) /**<
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_locale_upper_case (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_locale_upper_case */
|
||||
@@ -367,7 +367,7 @@ ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this_arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_trim (ecma_value_t this_arg) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_trim (const ecma_value_t& this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_trim */
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_object_from_char_code (ecma_value_t this_arg __unused, /**< 'this' argument */
|
||||
ecma_value_t args[], /**< arguments list */
|
||||
ecma_builtin_string_object_from_char_code (const ecma_value_t& this_arg __unused, /**< 'this' argument */
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
@@ -113,7 +113,7 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg __unused, /**<
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_string_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -141,7 +141,7 @@ ecma_builtin_string_dispatch_call (ecma_value_t *arguments_list_p, /**< argument
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_string_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_string_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_syntax_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_syntax_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_syntax_error_dispatch_call (ecma_value_t *arguments_list_p, /**< ar
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_syntax_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_syntax_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_syntax_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,7 +50,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_type_error_thrower_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_type_error_thrower_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -68,7 +68,7 @@ ecma_builtin_type_error_thrower_dispatch_call (ecma_value_t *arguments_list_p, /
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_type_error_thrower_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_type_error_thrower_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_type_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_type_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_type_error_dispatch_call (ecma_value_t *arguments_list_p, /**< argu
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_type_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_type_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_type_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_uri_error_dispatch_call (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_uri_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_uri_error_dispatch_call (ecma_value_t *arguments_list_p, /**< argum
|
||||
* @return completion-value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_uri_error_dispatch_construct (ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_builtin_uri_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
return ecma_builtin_uri_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,15 +62,15 @@ ecma_builtin_bin_search_for_magic_string_id_in_array (const ecma_magic_string_id
|
||||
is_extensible, \
|
||||
lowercase_name) \
|
||||
extern ecma_completion_value_t \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_call (ecma_value_t *arguments_list_p, \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_call (const ecma_value_t *arguments_list_p, \
|
||||
ecma_length_t arguments_list_len); \
|
||||
extern ecma_completion_value_t \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_construct (ecma_value_t *arguments_list_p, \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *arguments_list_p, \
|
||||
ecma_length_t arguments_list_len); \
|
||||
extern ecma_completion_value_t \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_routine (ecma_magic_string_id_t builtin_routine_id, \
|
||||
ecma_value_t this_arg_value, \
|
||||
ecma_value_t arguments_list [], \
|
||||
const ecma_value_t& this_arg_value, \
|
||||
const ecma_value_t arguments_list [], \
|
||||
ecma_length_t arguments_number); \
|
||||
extern ecma_property_t* \
|
||||
ecma_builtin_ ## lowercase_name ## _try_to_instantiate_property (ecma_object_t *obj_p, \
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id,
|
||||
ecma_magic_string_id_t builtin_routine_id,
|
||||
ecma_value_t this_arg_value,
|
||||
ecma_value_t arguments_list [],
|
||||
const ecma_value_t& this_arg_value,
|
||||
const ecma_value_t arguments_list [],
|
||||
ecma_length_t arguments_number);
|
||||
static void ecma_instantiate_builtin (ecma_builtin_id_t id);
|
||||
|
||||
@@ -360,8 +360,8 @@ ecma_builtin_make_function_object_for_routine (ecma_builtin_id_t builtin_id, /**
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument value */
|
||||
ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t& this_arg_value, /**< 'this' argument value */
|
||||
const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< length of the arguments list */
|
||||
{
|
||||
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
|
||||
@@ -450,7 +450,7 @@ ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
|
||||
ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< length of the arguments list */
|
||||
{
|
||||
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
|
||||
@@ -514,8 +514,8 @@ static ecma_completion_value_t
|
||||
ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id, /**< built-in object' identifier */
|
||||
ecma_magic_string_id_t builtin_routine_id, /**< name of the built-in object's
|
||||
routine property */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument value */
|
||||
ecma_value_t arguments_list [], /**< list of arguments passed to routine */
|
||||
const ecma_value_t& this_arg_value, /**< 'this' argument value */
|
||||
const ecma_value_t arguments_list [], /**< list of arguments passed to routine */
|
||||
ecma_length_t arguments_number) /**< length of arguments' list */
|
||||
{
|
||||
switch (builtin_object_id)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,12 +40,12 @@ extern void ecma_finalize_builtins (void);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_builtin_dispatch_call (ecma_object_t *obj_p,
|
||||
ecma_value_t this_arg,
|
||||
ecma_value_t *arguments_list_p,
|
||||
const ecma_value_t& this_arg,
|
||||
const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
extern ecma_completion_value_t
|
||||
ecma_builtin_dispatch_construct (ecma_object_t *obj_p,
|
||||
ecma_value_t *arguments_list_p,
|
||||
const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
extern ecma_property_t*
|
||||
ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p,
|
||||
|
||||
@@ -239,7 +239,7 @@ ecma_deref_object (ecma_object_t *object_p) /**< object */
|
||||
*/
|
||||
void
|
||||
ecma_gc_update_may_ref_younger_object_flag_by_value (ecma_object_t *obj_p, /**< object */
|
||||
ecma_value_t value) /**< value */
|
||||
const ecma_value_t& value) /**< value */
|
||||
{
|
||||
if (!ecma_is_value_object (value))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,7 @@ extern void ecma_gc_init (void);
|
||||
extern void ecma_init_gc_info (ecma_object_t *object_p);
|
||||
extern void ecma_ref_object (ecma_object_t *object_p);
|
||||
extern void ecma_deref_object (ecma_object_t *object_p);
|
||||
extern void ecma_gc_update_may_ref_younger_object_flag_by_value (ecma_object_t *obj_p, ecma_value_t value);
|
||||
extern void ecma_gc_update_may_ref_younger_object_flag_by_value (ecma_object_t *obj_p, const ecma_value_t& value);
|
||||
extern void ecma_gc_update_may_ref_younger_object_flag_by_object (ecma_object_t *obj_p, ecma_object_t *ref_obj_p);
|
||||
extern void ecma_gc_run (ecma_gc_gen_t max_gen_to_collect);
|
||||
extern void ecma_try_to_give_back_some_memory (mem_try_give_memory_back_severity_t severity);
|
||||
|
||||
@@ -34,8 +34,8 @@ JERRY_STATIC_ASSERT (sizeof (ecma_value_t) * JERRY_BITSINBYTE == ECMA_VALUE_SIZE
|
||||
*
|
||||
* @return type field
|
||||
*/
|
||||
static ecma_type_t __attribute_const__
|
||||
ecma_get_value_type_field (ecma_value_t value) /**< ecma-value */
|
||||
static ecma_type_t __attribute_pure__
|
||||
ecma_get_value_type_field (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_type_t) jrt_extract_bit_field (value,
|
||||
ECMA_VALUE_TYPE_POS,
|
||||
@@ -47,8 +47,8 @@ ecma_get_value_type_field (ecma_value_t value) /**< ecma-value */
|
||||
*
|
||||
* @return value field
|
||||
*/
|
||||
static uintptr_t __attribute_const__
|
||||
ecma_get_value_value_field (ecma_value_t value) /**< ecma-value */
|
||||
static uintptr_t __attribute_pure__
|
||||
ecma_get_value_value_field (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (uintptr_t) jrt_extract_bit_field (value,
|
||||
ECMA_VALUE_VALUE_POS,
|
||||
@@ -60,8 +60,8 @@ ecma_get_value_value_field (ecma_value_t value) /**< ecma-value */
|
||||
*
|
||||
* @return ecma-value with updated field
|
||||
*/
|
||||
static ecma_value_t __attribute_const__
|
||||
ecma_set_value_type_field (ecma_value_t value, /**< ecma-value to set field in */
|
||||
static ecma_value_t __attribute_pure__
|
||||
ecma_set_value_type_field (const ecma_value_t& value, /**< ecma-value to set field in */
|
||||
ecma_type_t type_field) /**< new field value */
|
||||
{
|
||||
return (ecma_value_t) jrt_set_bit_field_value (value,
|
||||
@@ -75,8 +75,8 @@ ecma_set_value_type_field (ecma_value_t value, /**< ecma-value to set field in *
|
||||
*
|
||||
* @return ecma-value with updated field
|
||||
*/
|
||||
static ecma_value_t __attribute_const__
|
||||
ecma_set_value_value_field (ecma_value_t value, /**< ecma-value to set field in */
|
||||
static ecma_value_t __attribute_pure__
|
||||
ecma_set_value_value_field (const ecma_value_t& value, /**< ecma-value to set field in */
|
||||
uintptr_t value_field) /**< new field value */
|
||||
{
|
||||
return (ecma_value_t) jrt_set_bit_field_value (value,
|
||||
@@ -91,8 +91,8 @@ ecma_set_value_value_field (ecma_value_t value, /**< ecma-value to set field in
|
||||
* @return true - if the value contains implementation-defined empty simple value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_empty (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_empty (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
|
||||
&& ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_EMPTY);
|
||||
@@ -104,8 +104,8 @@ ecma_is_value_empty (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains ecma-undefined simple value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_undefined (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_undefined (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
|
||||
&& ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
@@ -117,8 +117,8 @@ ecma_is_value_undefined (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains ecma-null simple value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_null (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_null (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
|
||||
&& ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_NULL);
|
||||
@@ -130,8 +130,8 @@ ecma_is_value_null (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains ecma-true or ecma-false simple values,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_boolean (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_boolean (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
|
||||
&& (ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_TRUE
|
||||
@@ -147,8 +147,8 @@ ecma_is_value_boolean (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains ecma-true simple value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_true (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_true (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
|
||||
&& ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_TRUE);
|
||||
@@ -160,8 +160,8 @@ ecma_is_value_true (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains ecma-number value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_number (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_number (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_NUMBER);
|
||||
} /* ecma_is_value_number */
|
||||
@@ -172,8 +172,8 @@ ecma_is_value_number (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains ecma-string value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_string (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_string (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_STRING);
|
||||
} /* ecma_is_value_string */
|
||||
@@ -184,8 +184,8 @@ ecma_is_value_string (ecma_value_t value) /**< ecma-value */
|
||||
* @return true - if the value contains object value,
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attribute_const__ __attribute_always_inline__
|
||||
ecma_is_value_object (ecma_value_t value) /**< ecma-value */
|
||||
inline bool __attribute_pure__ __attribute_always_inline__
|
||||
ecma_is_value_object (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT);
|
||||
} /* ecma_is_value_object */
|
||||
@@ -195,7 +195,7 @@ ecma_is_value_object (ecma_value_t value) /**< ecma-value */
|
||||
* script-visible types, i.e.: undefined, null, boolean, number, string, object.
|
||||
*/
|
||||
void
|
||||
ecma_check_value_type_is_spec_defined (ecma_value_t value) /**< ecma-value */
|
||||
ecma_check_value_type_is_spec_defined (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_value_undefined (value)
|
||||
|| ecma_is_value_null (value)
|
||||
@@ -281,8 +281,8 @@ ecma_make_object_value (ecma_object_t* object_p) /**< object to reference in val
|
||||
*
|
||||
* @return the pointer
|
||||
*/
|
||||
ecma_number_t* __attribute_const__
|
||||
ecma_get_number_from_value (ecma_value_t value) /**< ecma-value */
|
||||
ecma_number_t* __attribute_pure__
|
||||
ecma_get_number_from_value (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_NUMBER);
|
||||
|
||||
@@ -295,8 +295,8 @@ ecma_get_number_from_value (ecma_value_t value) /**< ecma-value */
|
||||
*
|
||||
* @return the pointer
|
||||
*/
|
||||
ecma_string_t* __attribute_const__
|
||||
ecma_get_string_from_value (ecma_value_t value) /**< ecma-value */
|
||||
ecma_string_t* __attribute_pure__
|
||||
ecma_get_string_from_value (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_STRING);
|
||||
|
||||
@@ -309,8 +309,8 @@ ecma_get_string_from_value (ecma_value_t value) /**< ecma-value */
|
||||
*
|
||||
* @return the pointer
|
||||
*/
|
||||
ecma_object_t* __attribute_const__
|
||||
ecma_get_object_from_value (ecma_value_t value) /**< ecma-value */
|
||||
ecma_object_t* __attribute_pure__
|
||||
ecma_get_object_from_value (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT);
|
||||
|
||||
@@ -340,7 +340,7 @@ ecma_get_object_from_value (ecma_value_t value) /**< ecma-value */
|
||||
* @return See note.
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_copy_value (const ecma_value_t value, /**< ecma-value */
|
||||
ecma_copy_value (const ecma_value_t& value, /**< ecma-value */
|
||||
bool do_ref_if_object) /**< if the value is object value,
|
||||
increment reference counter of the object */
|
||||
{
|
||||
@@ -397,7 +397,7 @@ ecma_copy_value (const ecma_value_t value, /**< ecma-value */
|
||||
* Free the ecma-value
|
||||
*/
|
||||
void
|
||||
ecma_free_value (ecma_value_t value, /**< value description */
|
||||
ecma_free_value (ecma_value_t& value, /**< value description */
|
||||
bool do_deref_if_object) /**< if the value is object value,
|
||||
decrement reference counter of the object */
|
||||
{
|
||||
@@ -495,10 +495,10 @@ ecma_set_completion_value_type_field (ecma_completion_value_t completion_value,
|
||||
*
|
||||
* @return completion value with updated field
|
||||
*/
|
||||
static ecma_completion_value_t __attribute_const__
|
||||
static ecma_completion_value_t __attribute_pure__
|
||||
ecma_set_completion_value_value_field (ecma_completion_value_t completion_value, /**< completion value
|
||||
* to set field in */
|
||||
ecma_value_t value_field) /**< new field value */
|
||||
const ecma_value_t& value_field) /**< new field value */
|
||||
{
|
||||
return (ecma_completion_value_t) jrt_set_bit_field_value (completion_value,
|
||||
value_field,
|
||||
@@ -531,9 +531,9 @@ ecma_set_completion_value_label_descriptor (ecma_completion_value_t completion_v
|
||||
*
|
||||
* @return completion value
|
||||
*/
|
||||
inline ecma_completion_value_t __attribute_const__ __attribute_always_inline__
|
||||
inline ecma_completion_value_t __attribute_pure__ __attribute_always_inline__
|
||||
ecma_make_completion_value (ecma_completion_type_t type, /**< type */
|
||||
ecma_value_t value) /**< value */
|
||||
const ecma_value_t& value) /**< value */
|
||||
{
|
||||
const bool is_type_ok = (type == ECMA_COMPLETION_TYPE_NORMAL
|
||||
#ifdef CONFIG_ECMA_EXCEPTION_SUPPORT
|
||||
@@ -606,8 +606,8 @@ ecma_make_simple_completion_value (ecma_simple_value_t simple_value) /**< simple
|
||||
*
|
||||
* @return completion value
|
||||
*/
|
||||
inline ecma_completion_value_t __attribute_const__ __attribute_always_inline__
|
||||
ecma_make_normal_completion_value (ecma_value_t value) /**< value */
|
||||
inline ecma_completion_value_t __attribute_pure__ __attribute_always_inline__
|
||||
ecma_make_normal_completion_value (const ecma_value_t& value) /**< value */
|
||||
{
|
||||
return ecma_make_completion_value (ECMA_COMPLETION_TYPE_NORMAL, value);
|
||||
} /* ecma_make_normal_completion_value */
|
||||
@@ -617,8 +617,8 @@ ecma_make_normal_completion_value (ecma_value_t value) /**< value */
|
||||
*
|
||||
* @return completion value
|
||||
*/
|
||||
inline ecma_completion_value_t __attribute_const__ __attribute_always_inline__
|
||||
ecma_make_throw_completion_value (ecma_value_t value) /**< value */
|
||||
inline ecma_completion_value_t __attribute_pure__ __attribute_always_inline__
|
||||
ecma_make_throw_completion_value (const ecma_value_t& value) /**< value */
|
||||
{
|
||||
#ifdef CONFIG_ECMA_EXCEPTION_SUPPORT
|
||||
return ecma_make_completion_value (ECMA_COMPLETION_TYPE_THROW, value);
|
||||
@@ -662,8 +662,8 @@ ecma_make_empty_completion_value (void)
|
||||
*
|
||||
* @return completion value
|
||||
*/
|
||||
inline ecma_completion_value_t __attribute_const__ __attribute_always_inline__
|
||||
ecma_make_return_completion_value (ecma_value_t value) /**< value */
|
||||
inline ecma_completion_value_t __attribute_pure__ __attribute_always_inline__
|
||||
ecma_make_return_completion_value (const ecma_value_t& value) /**< value */
|
||||
{
|
||||
return ecma_make_completion_value (ECMA_COMPLETION_TYPE_RETURN, value);
|
||||
} /* ecma_make_return_completion_value */
|
||||
@@ -787,12 +787,14 @@ ecma_free_completion_value (ecma_completion_value_t completion_value) /**< compl
|
||||
#endif /* CONFIG_ECMA_EXCEPTION_SUPPORT */
|
||||
case ECMA_COMPLETION_TYPE_RETURN:
|
||||
{
|
||||
ecma_free_value (ecma_get_completion_value_value_field (completion_value), true);
|
||||
ecma_value_t v = ecma_get_completion_value_value_field (completion_value);
|
||||
ecma_free_value (v, true);
|
||||
break;
|
||||
}
|
||||
case ECMA_COMPLETION_TYPE_EXIT:
|
||||
{
|
||||
JERRY_ASSERT(ecma_get_value_type_field (ecma_get_completion_value_value (completion_value)) == ECMA_TYPE_SIMPLE);
|
||||
ecma_value_t v = ecma_get_completion_value_value_field (completion_value);
|
||||
JERRY_ASSERT(ecma_get_value_type_field (v) == ECMA_TYPE_SIMPLE);
|
||||
break;
|
||||
}
|
||||
case ECMA_COMPLETION_TYPE_CONTINUE:
|
||||
|
||||
@@ -689,7 +689,9 @@ ecma_free_named_data_property (ecma_object_t *object_p, /**< object the property
|
||||
|
||||
ecma_deref_ecma_string (ECMA_GET_NON_NULL_POINTER (ecma_string_t,
|
||||
property_p->u.named_data_property.name_p));
|
||||
ecma_free_value (property_p->u.named_data_property.value, false);
|
||||
|
||||
ecma_value_t v = property_p->u.named_data_property.value;
|
||||
ecma_free_value (v, false);
|
||||
|
||||
ecma_dealloc_property (property_p);
|
||||
} /* ecma_free_named_data_property */
|
||||
@@ -875,7 +877,7 @@ ecma_get_named_data_property_value (const ecma_property_t *prop_p) /**< property
|
||||
*/
|
||||
void
|
||||
ecma_set_named_data_property_value (ecma_property_t *prop_p, /**< property */
|
||||
ecma_value_t value) /**< value to set */
|
||||
const ecma_value_t& value) /**< value to set */
|
||||
{
|
||||
JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDDATA);
|
||||
|
||||
@@ -894,7 +896,7 @@ ecma_set_named_data_property_value (ecma_property_t *prop_p, /**< property */
|
||||
void
|
||||
ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */
|
||||
ecma_property_t *prop_p, /**< property */
|
||||
ecma_value_t value) /**< value to assign */
|
||||
const ecma_value_t& value) /**< value to assign */
|
||||
{
|
||||
JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDDATA);
|
||||
#ifndef JERRY_NDEBUG
|
||||
@@ -922,7 +924,9 @@ ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_free_value (ecma_get_named_data_property_value (prop_p), false);
|
||||
ecma_value_t v = ecma_get_named_data_property_value (prop_p);
|
||||
ecma_free_value (v, false);
|
||||
|
||||
prop_p->u.named_data_property.value = ecma_copy_value (value, false);
|
||||
ecma_gc_update_may_ref_younger_object_flag_by_value (obj_p,
|
||||
prop_p->u.named_data_property.value);
|
||||
|
||||
@@ -61,39 +61,39 @@
|
||||
& ((1u << ECMA_POINTER_FIELD_WIDTH) - 1)))
|
||||
|
||||
/* ecma-helpers-value.c */
|
||||
extern bool ecma_is_value_empty (ecma_value_t value);
|
||||
extern bool ecma_is_value_undefined (ecma_value_t value);
|
||||
extern bool ecma_is_value_null (ecma_value_t value);
|
||||
extern bool ecma_is_value_boolean (ecma_value_t value);
|
||||
extern bool ecma_is_value_true (ecma_value_t value);
|
||||
extern bool ecma_is_value_empty (const ecma_value_t& value);
|
||||
extern bool ecma_is_value_undefined (const ecma_value_t& value);
|
||||
extern bool ecma_is_value_null (const ecma_value_t& value);
|
||||
extern bool ecma_is_value_boolean (const ecma_value_t& value);
|
||||
extern bool ecma_is_value_true (const ecma_value_t& value);
|
||||
|
||||
extern bool ecma_is_value_number (ecma_value_t value);
|
||||
extern bool ecma_is_value_string (ecma_value_t value);
|
||||
extern bool ecma_is_value_object (ecma_value_t value);
|
||||
extern bool ecma_is_value_number (const ecma_value_t& value);
|
||||
extern bool ecma_is_value_string (const ecma_value_t& value);
|
||||
extern bool ecma_is_value_object (const ecma_value_t& value);
|
||||
|
||||
extern void ecma_check_value_type_is_spec_defined (ecma_value_t value);
|
||||
extern void ecma_check_value_type_is_spec_defined (const ecma_value_t& value);
|
||||
|
||||
extern ecma_value_t ecma_make_simple_value (ecma_simple_value_t value);
|
||||
extern ecma_value_t ecma_make_number_value (ecma_number_t* num_p);
|
||||
extern ecma_value_t ecma_make_string_value (ecma_string_t* ecma_string_p);
|
||||
extern ecma_value_t ecma_make_object_value (ecma_object_t* object_p);
|
||||
extern ecma_number_t* __attribute_const__ ecma_get_number_from_value (ecma_value_t value);
|
||||
extern ecma_string_t* __attribute_const__ ecma_get_string_from_value (ecma_value_t value);
|
||||
extern ecma_object_t* __attribute_const__ ecma_get_object_from_value (ecma_value_t value);
|
||||
extern ecma_value_t ecma_copy_value (const ecma_value_t value, bool do_ref_if_object);
|
||||
extern void ecma_free_value (const ecma_value_t value, bool do_deref_if_object);
|
||||
extern ecma_number_t* __attribute_pure__ ecma_get_number_from_value (const ecma_value_t& value);
|
||||
extern ecma_string_t* __attribute_pure__ ecma_get_string_from_value (const ecma_value_t& value);
|
||||
extern ecma_object_t* __attribute_pure__ ecma_get_object_from_value (const ecma_value_t& value);
|
||||
extern ecma_value_t ecma_copy_value (const ecma_value_t& value, bool do_ref_if_object);
|
||||
extern void ecma_free_value (ecma_value_t& value, bool do_deref_if_object);
|
||||
|
||||
extern ecma_completion_value_t ecma_make_completion_value (ecma_completion_type_t type,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_make_label_completion_value (ecma_completion_type_t type,
|
||||
uint8_t depth_level,
|
||||
uint16_t offset);
|
||||
extern ecma_completion_value_t ecma_make_simple_completion_value (ecma_simple_value_t simple_value);
|
||||
extern ecma_completion_value_t ecma_make_normal_completion_value (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_make_throw_completion_value (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_make_normal_completion_value (const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_make_throw_completion_value (const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_make_throw_obj_completion_value (ecma_object_t *exception_p);
|
||||
extern ecma_completion_value_t ecma_make_empty_completion_value (void);
|
||||
extern ecma_completion_value_t ecma_make_return_completion_value (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_make_return_completion_value (const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_make_exit_completion_value (bool is_successful);
|
||||
extern ecma_completion_value_t ecma_make_meta_completion_value (void);
|
||||
extern ecma_value_t ecma_get_completion_value_value (ecma_completion_value_t completion_value);
|
||||
@@ -196,7 +196,7 @@ extern ecma_number_t ecma_number_exp (ecma_number_t num);
|
||||
|
||||
/* ecma-helpers-values-collection.c */
|
||||
|
||||
extern ecma_collection_header_t *ecma_new_values_collection (ecma_value_t values_buffer[],
|
||||
extern ecma_collection_header_t *ecma_new_values_collection (const ecma_value_t values_buffer[],
|
||||
ecma_length_t values_number,
|
||||
bool do_ref_if_object);
|
||||
extern void ecma_free_values_collection (ecma_collection_header_t* header_p, bool do_deref_if_object);
|
||||
@@ -211,9 +211,9 @@ typedef struct
|
||||
ecma_collection_header_t *header_p; /**< collection header */
|
||||
uint16_t next_chunk_cp; /**< compressed pointer to next chunk */
|
||||
ecma_length_t current_index; /**< index of current element */
|
||||
ecma_value_t *current_value_p; /**< pointer to current element */
|
||||
ecma_value_t *current_chunk_beg_p; /**< pointer to beginning of current chunk's data */
|
||||
ecma_value_t *current_chunk_end_p; /**< pointer to place right after the end of current chunk's data */
|
||||
const ecma_value_t *current_value_p; /**< pointer to current element */
|
||||
const ecma_value_t *current_chunk_beg_p; /**< pointer to beginning of current chunk's data */
|
||||
const ecma_value_t *current_chunk_end_p; /**< pointer to place right after the end of current chunk's data */
|
||||
} ecma_collection_iterator_t;
|
||||
|
||||
extern void
|
||||
@@ -275,10 +275,10 @@ extern void ecma_free_property (ecma_object_t *obj_p, ecma_property_t *prop_p);
|
||||
extern void ecma_delete_property (ecma_object_t *obj_p, ecma_property_t *prop_p);
|
||||
|
||||
extern ecma_value_t ecma_get_named_data_property_value (const ecma_property_t *prop_p);
|
||||
extern void ecma_set_named_data_property_value (ecma_property_t *prop_p, ecma_value_t value);
|
||||
extern void ecma_set_named_data_property_value (ecma_property_t *prop_p, const ecma_value_t& value);
|
||||
extern void ecma_named_data_property_assign_value (ecma_object_t *obj_p,
|
||||
ecma_property_t *prop_p,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
|
||||
extern bool ecma_is_property_writable (ecma_property_t* prop_p);
|
||||
extern void ecma_set_property_writable_attr (ecma_property_t* prop_p, bool is_writable);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -60,8 +60,8 @@ ecma_reject (bool is_throw) /**< Throw flag */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_array_object (ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to Array constructor */
|
||||
ecma_op_create_array_object (const ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to Array constructor */
|
||||
ecma_length_t arguments_list_len, /**< length of the arguments' list */
|
||||
bool is_treat_single_arg_as_length) /**< if the value is true,
|
||||
arguments_list_len is 1
|
||||
@@ -74,7 +74,7 @@ ecma_op_create_array_object (ecma_value_t *arguments_list_p, /**< list of argume
|
||||
|| arguments_list_p != NULL);
|
||||
|
||||
uint32_t length;
|
||||
ecma_value_t *array_items_p;
|
||||
const ecma_value_t *array_items_p;
|
||||
ecma_length_t array_items_count;
|
||||
|
||||
if (is_treat_single_arg_as_length
|
||||
@@ -444,8 +444,9 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
|
||||
ecma_number_t *num_p = ecma_alloc_number ();
|
||||
*num_p = ecma_number_add (ecma_uint32_to_number (index), ECMA_NUMBER_ONE);
|
||||
|
||||
ecma_free_value (ecma_get_named_data_property_value (len_prop_p), false);
|
||||
ecma_set_named_data_property_value (len_prop_p, ecma_make_number_value (num_p));
|
||||
ecma_named_data_property_assign_value (obj_p, len_prop_p, ecma_make_number_value (num_p));
|
||||
|
||||
ecma_dealloc_number (num_p);
|
||||
}
|
||||
|
||||
// f.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_create_array_object (ecma_value_t *arguments_list_p,
|
||||
ecma_op_create_array_object (const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_len,
|
||||
bool is_treat_single_arg_as_length);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boolean constructor */
|
||||
ecma_op_create_boolean_object (const ecma_value_t& arg) /**< argument passed to the Boolean constructor */
|
||||
{
|
||||
ecma_completion_value_t conv_to_boolean_completion = ecma_op_to_boolean (arg);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t ecma_op_create_boolean_object (ecma_value_t arg);
|
||||
extern ecma_completion_value_t ecma_op_create_boolean_object (const ecma_value_t& arg);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,8 +35,8 @@
|
||||
* false - otherwise.
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_value_t y) /**< second operand */
|
||||
ecma_op_abstract_equality_compare (const ecma_value_t& x, /**< first operand */
|
||||
const ecma_value_t& y) /**< second operand */
|
||||
{
|
||||
const bool is_x_undefined = ecma_is_value_undefined (x);
|
||||
const bool is_x_null = ecma_is_value_null (x);
|
||||
@@ -223,8 +223,8 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_op_strict_equality_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_value_t y) /**< second operand */
|
||||
ecma_op_strict_equality_compare (const ecma_value_t& x, /**< first operand */
|
||||
const ecma_value_t& y) /**< second operand */
|
||||
{
|
||||
const bool is_x_undefined = ecma_is_value_undefined (x);
|
||||
const bool is_x_null = ecma_is_value_null (x);
|
||||
@@ -335,14 +335,14 @@ ecma_op_strict_equality_compare (ecma_value_t x, /**< first operand */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_abstract_relational_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_value_t y, /**< second operand */
|
||||
ecma_op_abstract_relational_compare (const ecma_value_t& x, /**< first operand */
|
||||
const ecma_value_t& y, /**< second operand */
|
||||
bool left_first) /**< 'LeftFirst' flag */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
ecma_value_t first_converted_value = left_first ? x : y;
|
||||
ecma_value_t second_converted_value = left_first ? y : x;
|
||||
const ecma_value_t& first_converted_value = left_first ? x : y;
|
||||
const ecma_value_t& second_converted_value = left_first ? y : x;
|
||||
|
||||
// 1., 2.
|
||||
ECMA_TRY_CATCH(prim_first_converted_value,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,9 +26,13 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t ecma_op_abstract_equality_compare (ecma_value_t x, ecma_value_t y);
|
||||
extern bool ecma_op_strict_equality_compare (ecma_value_t x, ecma_value_t y);
|
||||
extern ecma_completion_value_t ecma_op_abstract_relational_compare (ecma_value_t x, ecma_value_t y, bool left_first);
|
||||
extern ecma_completion_value_t ecma_op_abstract_equality_compare (const ecma_value_t& x,
|
||||
const ecma_value_t& y);
|
||||
extern bool ecma_op_strict_equality_compare (const ecma_value_t& x,
|
||||
const ecma_value_t& y);
|
||||
extern ecma_completion_value_t ecma_op_abstract_relational_compare (const ecma_value_t& x,
|
||||
const ecma_value_t& y,
|
||||
bool left_first);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_check_object_coercible (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_check_object_coercible (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -74,8 +74,8 @@ ecma_op_check_object_coercible (ecma_value_t value) /**< ecma-value */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_op_same_value (ecma_value_t x, /**< ecma-value */
|
||||
ecma_value_t y) /**< ecma-value */
|
||||
ecma_op_same_value (const ecma_value_t& x, /**< ecma-value */
|
||||
const ecma_value_t& y) /**< ecma-value */
|
||||
{
|
||||
const bool is_x_undefined = ecma_is_value_undefined (x);
|
||||
const bool is_x_null = ecma_is_value_null (x);
|
||||
@@ -157,7 +157,7 @@ ecma_op_same_value (ecma_value_t x, /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_primitive (ecma_value_t value, /**< ecma-value */
|
||||
ecma_op_to_primitive (const ecma_value_t& value, /**< ecma-value */
|
||||
ecma_preferred_type_hint_t preferred_type) /**< preferred type hint */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
@@ -185,7 +185,7 @@ ecma_op_to_primitive (ecma_value_t value, /**< ecma-value */
|
||||
* However, ecma_free_completion_value may be called for it, but it is a no-op.
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_boolean (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_boolean (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -248,7 +248,7 @@ ecma_op_to_boolean (ecma_value_t value) /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_number (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_number (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -319,7 +319,7 @@ ecma_op_to_number (ecma_value_t value) /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_string (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_string (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -387,7 +387,7 @@ ecma_op_to_string (ecma_value_t value) /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_object (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_object (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -557,7 +557,7 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t* src_prop_des
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
|
||||
ecma_op_to_property_descriptor (const ecma_value_t& obj_value, /**< object value */
|
||||
ecma_property_descriptor_t *out_prop_desc_p) /**< out: filled property descriptor
|
||||
if return value is normal
|
||||
empty completion value */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,16 +37,18 @@ typedef enum
|
||||
ECMA_PREFERRED_TYPE_STRING /**< String */
|
||||
} ecma_preferred_type_hint_t;
|
||||
|
||||
extern ecma_completion_value_t ecma_op_check_object_coercible (ecma_value_t value);
|
||||
extern bool ecma_op_same_value (ecma_value_t x, ecma_value_t y);
|
||||
extern ecma_completion_value_t ecma_op_to_primitive (ecma_value_t value, ecma_preferred_type_hint_t preferred_type);
|
||||
extern ecma_completion_value_t ecma_op_to_boolean (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_op_to_number (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_op_to_string (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_op_to_object (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_op_check_object_coercible (const ecma_value_t& value);
|
||||
extern bool ecma_op_same_value (const ecma_value_t& x,
|
||||
const ecma_value_t& y);
|
||||
extern ecma_completion_value_t ecma_op_to_primitive (const ecma_value_t& value,
|
||||
ecma_preferred_type_hint_t preferred_type);
|
||||
extern ecma_completion_value_t ecma_op_to_boolean (const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_op_to_number (const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_op_to_string (const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_op_to_object (const ecma_value_t& value);
|
||||
|
||||
extern ecma_object_t* ecma_op_from_property_descriptor (const ecma_property_descriptor_t* src_prop_desc_p);
|
||||
extern ecma_completion_value_t ecma_op_to_property_descriptor (ecma_value_t obj_value,
|
||||
extern ecma_completion_value_t ecma_op_to_property_descriptor (const ecma_value_t& obj_value,
|
||||
ecma_property_descriptor_t *out_prop_desc_p);
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,7 +87,7 @@ ecma_unpack_code_internal_property_value (uint32_t value, /**< packed value */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_op_is_callable (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_is_callable (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
if (!ecma_is_value_object (value))
|
||||
{
|
||||
@@ -111,7 +111,7 @@ ecma_op_is_callable (ecma_value_t value) /**< ecma-value */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_is_constructor (ecma_value_t value) /**< ecma-value */
|
||||
ecma_is_constructor (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
if (!ecma_is_value_object (value))
|
||||
{
|
||||
@@ -295,7 +295,7 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[], /**< f
|
||||
static ecma_completion_value_t
|
||||
ecma_function_call_setup_args_variables (ecma_object_t *func_obj_p, /**< Function object */
|
||||
ecma_object_t *env_p, /**< lexical environment */
|
||||
ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len, /**< length of argument list */
|
||||
bool is_strict) /**< flag indicating strict mode */
|
||||
{
|
||||
@@ -377,7 +377,7 @@ ecma_function_call_setup_args_variables (ecma_object_t *func_obj_p, /**< Functio
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object */
|
||||
ecma_value_t value) /**< argument 'V' */
|
||||
const ecma_value_t& value) /**< argument 'V' */
|
||||
{
|
||||
JERRY_ASSERT(func_obj_p != NULL
|
||||
&& !ecma_is_lexical_environment (func_obj_p));
|
||||
@@ -457,8 +457,8 @@ ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object *
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument's value */
|
||||
ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t& this_arg_value, /**< 'this' argument's value */
|
||||
const ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< length of arguments list */
|
||||
{
|
||||
JERRY_ASSERT(func_obj_p != NULL
|
||||
@@ -564,7 +564,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
|
||||
ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< length of arguments list */
|
||||
{
|
||||
JERRY_ASSERT(func_obj_p != NULL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,8 +26,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern bool ecma_op_is_callable (ecma_value_t value);
|
||||
extern bool ecma_is_constructor (ecma_value_t value);
|
||||
extern bool ecma_op_is_callable (const ecma_value_t& value);
|
||||
extern bool ecma_is_constructor (const ecma_value_t& value);
|
||||
|
||||
extern ecma_object_t*
|
||||
ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[],
|
||||
@@ -38,18 +38,18 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[],
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_call (ecma_object_t *func_obj_p,
|
||||
ecma_value_t this_arg_value,
|
||||
ecma_value_t* arguments_list_p,
|
||||
const ecma_value_t& this_arg_value,
|
||||
const ecma_value_t* arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_construct (ecma_object_t *func_obj_p,
|
||||
ecma_value_t* arguments_list_p,
|
||||
const ecma_value_t* arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_has_instance (ecma_object_t *func_obj_p,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_declaration (ecma_object_t *lex_env_p,
|
||||
|
||||
@@ -133,7 +133,7 @@ ecma_completion_value_t
|
||||
ecma_op_put_value_lex_env_base (ecma_object_t *ref_base_lex_env_p, /**< reference's base (lexical environment) */
|
||||
ecma_string_t *var_name_string_p, /**< variable name */
|
||||
bool is_strict, /**< flag indicating strict mode */
|
||||
ecma_value_t value) /**< ECMA-value */
|
||||
const ecma_value_t& value) /**< ECMA-value */
|
||||
{
|
||||
const bool is_unresolvable_reference = (ref_base_lex_env_p == NULL);
|
||||
|
||||
@@ -204,7 +204,7 @@ ecma_reject_put (bool is_throw) /**< Throw flag */
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_put_value_object_base (ecma_reference_t ref, /**< ECMA-reference */
|
||||
ecma_value_t value) /**< ECMA-value */
|
||||
const ecma_value_t& value) /**< ECMA-value */
|
||||
{
|
||||
const ecma_value_t base = ref.base;
|
||||
const bool is_unresolvable_reference = ecma_is_value_undefined (base);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -135,7 +135,7 @@ ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environme
|
||||
ecma_completion_value_t
|
||||
ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_string_t *name_p, /**< argument N */
|
||||
ecma_value_t value, /**< argument V */
|
||||
const ecma_value_t& value, /**< argument V */
|
||||
bool is_strict) /**< argument S */
|
||||
{
|
||||
JERRY_ASSERT(lex_env_p != NULL
|
||||
@@ -408,7 +408,7 @@ ecma_op_create_immutable_binding (ecma_object_t *lex_env_p, /**< lexical environ
|
||||
void
|
||||
ecma_op_initialize_immutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_string_t *name_p, /**< argument N */
|
||||
ecma_value_t value) /**< argument V */
|
||||
const ecma_value_t& value) /**< argument V */
|
||||
{
|
||||
JERRY_ASSERT(lex_env_p != NULL
|
||||
&& ecma_is_lexical_environment (lex_env_p));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,9 +36,9 @@ extern ecma_completion_value_t ecma_op_get_value_object_base (ecma_reference_t r
|
||||
extern ecma_completion_value_t ecma_op_put_value_lex_env_base (ecma_object_t *ref_base_lex_env_p,
|
||||
ecma_string_t *var_name_string_p,
|
||||
bool is_strict,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_op_put_value_object_base (ecma_reference_t ref,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
|
||||
/* ECMA-262 v5, Table 17. Abstract methods of Environment Records */
|
||||
extern bool ecma_op_has_binding (ecma_object_t *lex_env_p,
|
||||
@@ -48,7 +48,7 @@ extern ecma_completion_value_t ecma_op_create_mutable_binding (ecma_object_t *le
|
||||
bool is_deletable);
|
||||
extern ecma_completion_value_t ecma_op_set_mutable_binding (ecma_object_t *lex_env_p,
|
||||
ecma_string_t *name_p,
|
||||
ecma_value_t value,
|
||||
const ecma_value_t& value,
|
||||
bool is_strict);
|
||||
extern ecma_completion_value_t ecma_op_get_binding_value (ecma_object_t *lex_env_p,
|
||||
ecma_string_t *name_p,
|
||||
@@ -62,7 +62,7 @@ extern void ecma_op_create_immutable_binding (ecma_object_t *lex_env_p,
|
||||
ecma_string_t *name_p);
|
||||
extern void ecma_op_initialize_immutable_binding (ecma_object_t *lex_env_p,
|
||||
ecma_string_t *name_p,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
|
||||
extern ecma_object_t* ecma_op_create_global_environment (ecma_object_t *glob_obj_p);
|
||||
extern bool ecma_is_lexical_environment_global (ecma_object_t *lex_env_p);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Number constructor */
|
||||
ecma_op_create_number_object (const ecma_value_t& arg) /**< argument passed to the Number constructor */
|
||||
{
|
||||
ecma_completion_value_t conv_to_num_completion = ecma_op_to_number (arg);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t ecma_op_create_number_object (ecma_value_t arg);
|
||||
extern ecma_completion_value_t ecma_op_create_number_object (const ecma_value_t& arg);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -46,7 +46,7 @@ ecma_create_arguments_object (ecma_object_t *func_obj_p, /**< callee function */
|
||||
object is created for */
|
||||
ecma_collection_iterator_t *formal_params_iter_p, /**< formal parameters
|
||||
collection iterator */
|
||||
ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
const ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_list_length, /**< length of arguments' list */
|
||||
bool is_strict) /**< flag indicating whether strict mode is enabled */
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,7 @@ extern ecma_object_t*
|
||||
ecma_create_arguments_object (ecma_object_t *func_obj_p,
|
||||
ecma_object_t *lex_env_p,
|
||||
ecma_collection_iterator_t *formal_params_iter_p,
|
||||
ecma_value_t *arguments_list_p,
|
||||
const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_length,
|
||||
bool is_strict);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ ecma_op_create_object_object_noarg (void)
|
||||
* @return pointer to newly created 'Object' object
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_object_object_arg (ecma_value_t value) /**< argument of constructor */
|
||||
ecma_op_create_object_object_arg (const ecma_value_t& value) /**< argument of constructor */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -235,7 +235,7 @@ ecma_op_general_object_get_property (ecma_object_t *obj_p, /**< the object */
|
||||
ecma_completion_value_t
|
||||
ecma_op_general_object_put (ecma_object_t *obj_p, /**< the object */
|
||||
ecma_string_t *property_name_p, /**< property name */
|
||||
ecma_value_t value, /**< ecma-value */
|
||||
const ecma_value_t& value, /**< ecma-value */
|
||||
bool is_throw) /**< flag that controls failure handling */
|
||||
{
|
||||
JERRY_ASSERT(obj_p != NULL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
extern ecma_object_t* ecma_op_create_object_object_noarg (void);
|
||||
extern ecma_completion_value_t ecma_op_create_object_object_arg (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_op_create_object_object_arg (const ecma_value_t& value);
|
||||
|
||||
extern ecma_completion_value_t ecma_op_general_object_get (ecma_object_t *obj_p,
|
||||
ecma_string_t *property_name_p);
|
||||
@@ -37,7 +37,7 @@ extern ecma_property_t *ecma_op_general_object_get_property (ecma_object_t *obj_
|
||||
ecma_string_t *property_name_p);
|
||||
extern ecma_completion_value_t ecma_op_general_object_put (ecma_object_t *obj_p,
|
||||
ecma_string_t *property_name_p,
|
||||
ecma_value_t value,
|
||||
const ecma_value_t& value,
|
||||
bool is_throw);
|
||||
extern bool ecma_op_general_object_can_put (ecma_object_t *obj_p,
|
||||
ecma_string_t *property_name_p);
|
||||
|
||||
@@ -221,7 +221,7 @@ ecma_op_object_get_property (ecma_object_t *obj_p, /**< the object */
|
||||
ecma_completion_value_t
|
||||
ecma_op_object_put (ecma_object_t *obj_p, /**< the object */
|
||||
ecma_string_t *property_name_p, /**< property name */
|
||||
ecma_value_t value, /**< ecma-value */
|
||||
const ecma_value_t& value, /**< ecma-value */
|
||||
bool is_throw) /**< flag that controls failure handling */
|
||||
{
|
||||
JERRY_ASSERT(obj_p != NULL
|
||||
@@ -448,7 +448,7 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_object_has_instance (ecma_object_t *obj_p, /**< the object */
|
||||
ecma_value_t value) /**< argument 'V' */
|
||||
const ecma_value_t& value) /**< argument 'V' */
|
||||
{
|
||||
JERRY_ASSERT(obj_p != NULL
|
||||
&& !ecma_is_lexical_environment (obj_p));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ extern ecma_property_t *ecma_op_object_get_own_property (ecma_object_t *obj_p, e
|
||||
extern ecma_property_t *ecma_op_object_get_property (ecma_object_t *obj_p, ecma_string_t *property_name_p);
|
||||
extern ecma_completion_value_t ecma_op_object_put (ecma_object_t *obj_p,
|
||||
ecma_string_t *property_name_p,
|
||||
ecma_value_t value,
|
||||
const ecma_value_t& value,
|
||||
bool is_throw);
|
||||
extern bool ecma_op_object_can_put (ecma_object_t *obj_p, ecma_string_t *property_name_p);
|
||||
extern ecma_completion_value_t ecma_op_object_delete (ecma_object_t *obj_p,
|
||||
@@ -44,7 +44,7 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p,
|
||||
const ecma_property_descriptor_t* property_desc_p,
|
||||
bool is_throw);
|
||||
extern ecma_completion_value_t ecma_op_object_has_instance (ecma_object_t *obj_p,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
|
||||
@@ -93,7 +93,7 @@ ecma_op_get_identifier_reference (ecma_object_t *lex_env_p, /**< lexical environ
|
||||
* Returned value must be freed through ecma_free_reference.
|
||||
*/
|
||||
ecma_reference_t
|
||||
ecma_make_reference (ecma_value_t base, /**< base value */
|
||||
ecma_make_reference (const ecma_value_t& base, /**< base value */
|
||||
ecma_string_t *name_p, /**< referenced name */
|
||||
bool is_strict) /**< strict reference flag */
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ extern ecma_object_t* ecma_op_resolve_reference_base (ecma_object_t *lex_env_p,
|
||||
extern ecma_reference_t ecma_op_get_identifier_reference (ecma_object_t *lex_env_p,
|
||||
ecma_string_t *name_p,
|
||||
bool is_strict);
|
||||
extern ecma_reference_t ecma_make_reference (ecma_value_t base,
|
||||
extern ecma_reference_t ecma_make_reference (const ecma_value_t& base,
|
||||
ecma_string_t *name_p,
|
||||
bool is_strict);
|
||||
extern void ecma_free_reference (ecma_reference_t ref);
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_string_object (ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to String constructor */
|
||||
ecma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to String constructor */
|
||||
ecma_length_t arguments_list_len) /**< length of the arguments' list */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_create_string_object (ecma_value_t *arguments_list_p,
|
||||
ecma_op_create_string_object (const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
|
||||
extern ecma_property_t*
|
||||
|
||||
Reference in New Issue
Block a user