Home
last modified time | relevance | path

Searched refs:jerry_value_t (Results 1 – 25 of 106) sorted by relevance

12345

/third_party/jerryscript/jerry-core/include/
Djerryscript-core.h158 typedef uint32_t jerry_value_t; typedef
193 jerry_value_t value;
196 jerry_value_t getter;
199 jerry_value_t setter;
218 typedef jerry_value_t (*jerry_external_handler_t) (const jerry_value_t function_obj,
219 const jerry_value_t this_val,
220 const jerry_value_t args_p[],
239 typedef jerry_value_t (*jerry_vm_exec_stop_callback_t) (void *user_p);
244 typedef bool (*jerry_object_property_foreach_t) (const jerry_value_t property_name,
245 const jerry_value_t property_value,
[all …]
/third_party/jerryscript/jerry-ext/include/jerryscript-ext/
Dhandler.h30 jerry_value_t jerryx_handler_register_global (const jerry_char_t *name_p,
37 jerry_value_t jerryx_handler_assert_fatal (const jerry_value_t func_obj_val, const jerry_value_t th…
38 … const jerry_value_t args_p[], const jerry_length_t args_cnt);
39 jerry_value_t jerryx_handler_assert_throw (const jerry_value_t func_obj_val, const jerry_value_t th…
40 … const jerry_value_t args_p[], const jerry_length_t args_cnt);
41 jerry_value_t jerryx_handler_assert (const jerry_value_t func_obj_val, const jerry_value_t this_p,
42 const jerry_value_t args_p[], const jerry_length_t args_cnt);
43 jerry_value_t jerryx_handler_gc (const jerry_value_t func_obj_val, const jerry_value_t this_p,
44 const jerry_value_t args_p[], const jerry_length_t args_cnt);
45 jerry_value_t jerryx_handler_print (const jerry_value_t func_obj_val, const jerry_value_t this_p,
[all …]
Darg.h42 typedef jerry_value_t (*jerryx_arg_transform_func_t) (jerryx_arg_js_iterator_t *js_arg_iter_p, /**<…
75 jerry_value_t jerryx_arg_transform_this_and_args (const jerry_value_t this_val,
76 const jerry_value_t *js_arg_p,
81 jerry_value_t jerryx_arg_transform_args (const jerry_value_t *js_arg_p,
86 jerry_value_t jerryx_arg_transform_object_properties (const jerry_value_t obj_val,
91 jerry_value_t jerryx_arg_transform_array (const jerry_value_t array_val,
170 jerryx_arg_function (jerry_value_t *dest, jerryx_arg_optional_t opt_flag);
182 jerry_value_t
188 jerry_value_t jerryx_arg_js_iterator_pop (jerryx_arg_js_iterator_t *js_arg_iter_p);
189 jerry_value_t jerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p);
[all …]
/third_party/jerryscript/tests/unit-ext/
Dtest-ext-arg.c108 static jerry_value_t
109 test_validator1_handler (const jerry_value_t func_obj_val, /**< function object */ in test_validator1_handler()
110 const jerry_value_t this_val, /**< this value */ in test_validator1_handler()
111 const jerry_value_t args_p[], /**< arguments list */ in test_validator1_handler()
119 jerry_value_t arg4 = jerry_create_undefined (); in test_validator1_handler()
135 jerry_value_t is_ok = jerryx_arg_transform_this_and_args (this_val, in test_validator1_handler()
180 static jerry_value_t
184 jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p); in my_custom_transform()
185 jerry_value_t to_number = jerry_value_to_number (js_arg); in my_custom_transform()
212 static jerry_value_t
[all …]
Dtest-ext-method-register.c26 static jerry_value_t
27 method_hello (const jerry_value_t jfunc, /**< function object */ in method_hello()
28 const jerry_value_t jthis, /**< function this */ in method_hello()
29 const jerry_value_t jargv[], /**< arguments */ in method_hello()
42 freeze_property (jerry_value_t target_obj, /**< target object */ in freeze_property()
51 jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) target_prop); in freeze_property()
52 jerry_value_t return_value = jerry_define_own_property (target_obj, prop_name, &prop_desc); in freeze_property()
68 jerry_value_t target_object = jerry_create_object (); in test_simple_registration()
91 jerry_value_t global_obj = jerry_get_global_object (); in test_simple_registration()
98 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration()
[all …]
/third_party/jerryscript/jerry-ext/module/
Dmodule.c36 static jerry_value_t
39 const jerry_value_t module_name) /**< the module name */ in jerryx_module_create_error()
41 jerry_value_t ret = jerry_create_error (error_type, message); in jerryx_module_create_error()
43 jerry_value_t error_object = jerry_get_value_from_error (ret, false); in jerryx_module_create_error()
44 jerry_value_t property_name = jerry_create_string (module_name_property_name); in jerryx_module_create_error()
59 *((jerry_value_t *) user_data_p) = jerry_create_object (); in jerryx_module_manager_init()
68 jerry_release_value (*(jerry_value_t *) user_data_p); in jerryx_module_manager_deinit()
78 .bytes_needed = sizeof (jerry_value_t)
117 jerryx_module_check_cache (jerry_value_t cache, /**< cache from which to attempt to retrieve the mo… in jerryx_module_check_cache()
118jerry_value_t module_name, /**< JerryScript string value holding the module name */ in jerryx_module_check_cache()
[all …]
/third_party/jerryscript/tests/unit-core/
Dtest-newtarget.cpp25 static jerry_value_t
29 jerry_value_t global_obj_val = jerry_get_global_object (); in register_js_function()
31 jerry_value_t function_val = jerry_create_external_function (handler_p); in register_js_function()
32 jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) name_p); in register_js_function()
33 jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val); in register_js_function()
50 static jerry_value_t
51 construct_handler (const jerry_value_t func_obj_val, /**< function object */ in construct_handler()
52 const jerry_value_t this_val, /**< this arg */ in construct_handler()
53 const jerry_value_t args_p[], /**< function arguments */ in construct_handler()
72 jerry_value_t target = jerry_get_new_target (); in construct_handler()
[all …]
Dtest-proxy.cpp62 static jerry_value_t
63 handler_get (const jerry_value_t function_obj, /**< function object */ in handler_get()
64 const jerry_value_t this_val, /**< this arg */ in handler_get()
65 const jerry_value_t args_p[], /**< function arguments */ in handler_get()
88 static jerry_value_t
89 handler_set (const jerry_value_t function_obj, /**< function object */ in handler_set()
90 const jerry_value_t this_val, /**< this arg */ in handler_set()
91 const jerry_value_t args_p[], /**< function arguments */ in handler_set()
119 set_property (jerry_value_t target, /**< target object */ in set_property()
121 jerry_value_t value) /**< value of the property */ in set_property()
[all …]
Dtest-promise.cpp34 static jerry_value_t my_promise1;
35 static jerry_value_t my_promise2;
39 static jerry_value_t
40 create_promise1_handler (const jerry_value_t func_obj_val, /**< function object */ in create_promise1_handler()
41 const jerry_value_t this_val, /**< this value */ in create_promise1_handler()
42 const jerry_value_t args_p[], /**< arguments list */ in create_promise1_handler()
50 jerry_value_t ret = jerry_create_promise (); in create_promise1_handler()
56 static jerry_value_t
57 create_promise2_handler (const jerry_value_t func_obj_val, /**< function object */ in create_promise2_handler()
58 const jerry_value_t this_val, /**< this value */ in create_promise2_handler()
[all …]
Dtest-internal-properties.cpp54 jerry_value_t object = jerry_create_object ();
56 jerry_value_t prop_name_1 = jerry_create_string ((const jerry_char_t *) "foo");
57 jerry_value_t prop_name_2 = jerry_create_string ((const jerry_char_t *) "non_hidden_prop");
58 jerry_value_t prop_name_3;
62 jerry_value_t prop_name_3_desc = jerry_create_string ((const jerry_char_t *) "bar");
71 jerry_value_t internal_prop_name_1 = jerry_create_string ((const jerry_char_t *) "hidden_foo");
72 jerry_value_t internal_prop_name_2 = jerry_create_string ((const jerry_char_t *) "hidden_prop");
73 jerry_value_t internal_prop_name_3;
77 jerry_value_t internal_prop_name_3_desc = jerry_create_string ((const jerry_char_t *) "bar");
86 jerry_value_t prop_value_1 = jerry_create_number (5.5);
[all …]
Dtest-api-promise.cpp25 jerry_value_t my_promise = jerry_create_promise (); in test_promise_resolve_success()
29 jerry_value_t promise_result = jerry_get_promise_result (my_promise); in test_promise_resolve_success()
38 jerry_value_t resolve_value = jerry_create_object (); in test_promise_resolve_success()
40 jerry_value_t obj_key = jerry_create_string ((const jerry_char_t *) "key_one"); in test_promise_resolve_success()
41 jerry_value_t set_result = jerry_set_property (resolve_value, obj_key, jerry_create_number (3)); in test_promise_resolve_success()
49jerry_value_t resolve_result = jerry_resolve_or_reject_promise (my_promise, resolve_value, true); in test_promise_resolve_success()
54 jerry_value_t promise_result = jerry_get_promise_result (my_promise); in test_promise_resolve_success()
57 jerry_value_t obj_key = jerry_create_string ((const jerry_char_t *) "key_one"); in test_promise_resolve_success()
58 jerry_value_t get_result = jerry_get_property (promise_result, obj_key); in test_promise_resolve_success()
76jerry_value_t resolve_result = jerry_resolve_or_reject_promise (my_promise, jerry_create_number (5… in test_promise_resolve_success()
[all …]
Dtest-objects-foreach.cpp23 count_objects (jerry_value_t object, void *user_arg) in count_objects()
37 jerry_value_t global = jerry_get_global_object (); in test_container()
38 jerry_value_t map_str = jerry_create_string ((const jerry_char_t *) "Map"); in test_container()
39 jerry_value_t map_result = jerry_get_property (global, map_str); in test_container()
56 jerry_value_t array = jerry_eval ((const jerry_char_t *) array_str, sizeof (array_str) - 1, 0); in test_container()
65 jerry_value_t result = jerry_eval ((const jerry_char_t *) eval_str, sizeof (eval_str) - 1, 0); in test_container()
79 jerry_value_t result = jerry_eval ((const jerry_char_t *) eval_str, sizeof (eval_str) - 1, 0); in test_container()
100 jerry_value_t object = jerry_create_object (); in test_internal_prop()
108 jerry_value_t object = jerry_create_object (); in test_internal_prop()
119 jerry_value_t internal_prop_name = jerry_create_string ((const jerry_char_t *) "hidden_foo"); in test_internal_prop()
[all …]
Dtest-typedarray.cpp40 jerry_value_t value) /**< function callback */ in register_js_value()
42 jerry_value_t global_obj_val = jerry_get_global_object (); in register_js_value()
44 jerry_value_t name_val = jerry_create_string ((const jerry_char_t *) name_p); in register_js_value()
45 jerry_value_t result_val = jerry_set_property (global_obj_val, name_val, value); in register_js_value()
53 static jerry_value_t
54 assert_handler (const jerry_value_t func_obj_val, /**< function object */ in assert_handler()
55 const jerry_value_t this_val, /**< this arg */ in assert_handler()
56 const jerry_value_t args_p[], /**< function arguments */ in assert_handler()
88 test_typedarray_info (jerry_value_t typedarray, /**< target TypedArray to query */ in test_typedarray_info()
100 jerry_value_t arraybuffer = jerry_get_typedarray_buffer (typedarray, &byte_offset, &byte_length); in test_typedarray_info()
[all …]
Dtest-native-instanceof.cpp24 static jerry_value_t
25 external_function (const jerry_value_t function_obj, in external_function()
26 const jerry_value_t this_arg, in external_function()
27 const jerry_value_t args_p[], in external_function()
39 test_instanceof (jerry_value_t instanceof, in test_instanceof()
40 jerry_value_t constructor) in test_instanceof()
42 jerry_value_t instance = jerry_construct_object (constructor, NULL, 0); in test_instanceof()
43 jerry_value_t args[2] = in test_instanceof()
48 jerry_value_t undefined = jerry_create_undefined (); in test_instanceof()
49 jerry_value_t result = jerry_call_function (instanceof, undefined, args, 2); in test_instanceof()
[all …]
Dtest-resource-name.cpp23 static jerry_value_t
24 resource_name_handler (const jerry_value_t function_obj, /**< function object */ in resource_name_handler()
25 const jerry_value_t this_val, /**< this value */ in resource_name_handler()
26 const jerry_value_t args_p[], /**< argument list */ in resource_name_handler()
32 jerry_value_t undefined_value = jerry_create_undefined (); in resource_name_handler()
33jerry_value_t resource_name = jerry_get_resource_name (args_count > 0 ? args_p[0] : undefined_valu… in resource_name_handler()
76 jerry_value_t global = jerry_get_global_object ();
80 jerry_value_t func = jerry_create_external_function (resource_name_handler);
81 jerry_value_t name = jerry_create_string ((const jerry_char_t *) "resourceName");
82 jerry_value_t result = jerry_set_property (global, name, func);
[all …]
Dtest-api.cpp66 static jerry_value_t
67 handler (const jerry_value_t func_obj_val, /**< function object */ in handler()
68 const jerry_value_t this_val, /**< this value */ in handler()
69 const jerry_value_t args_p[], /**< arguments list */ in handler()
94 static jerry_value_t
95 handler_throw_test (const jerry_value_t func_obj_val, /**< function object */ in handler_throw_test()
96 const jerry_value_t this_val, /**< this value */ in handler_throw_test()
97 const jerry_value_t args_p[], /**< arguments list */ in handler_throw_test()
142 static jerry_value_t
143 handler_construct (const jerry_value_t func_obj_val, /**< function object */ in handler_construct()
[all …]
Dtest-arraybuffer.cpp27 jerry_value_t value) /**< JS value */ in register_js_value()
29 jerry_value_t global_obj_val = jerry_get_global_object (); in register_js_value()
31 jerry_value_t name_val = jerry_create_string ((const jerry_char_t *) name_p); in register_js_value()
32 jerry_value_t result_val = jerry_set_property (global_obj_val, name_val, value); in register_js_value()
41 static jerry_value_t
42 assert_handler (const jerry_value_t func_obj_val, /**< function object */ in assert_handler()
43 const jerry_value_t this_val, /**< this arg */ in assert_handler()
44 const jerry_value_t args_p[], /**< function arguments */ in assert_handler()
123 jerry_value_t function_val = jerry_create_external_function (assert_handler);
130 jerry_value_t eval_arraybuffer = jerry_eval (eval_arraybuffer_src,
[all …]
/third_party/jerryscript/jerry-ext/arg/
Darg-transform-functions.c28 jerry_value_t
33 jerry_value_t js_arg = jerryx_arg_js_iterator_peek (js_arg_iter_p); in jerryx_arg_transform_optional()
50 static jerry_value_t
54 jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p); in jerryx_arg_transform_number_strict_common()
74 static jerry_value_t
78 jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p); in jerryx_arg_transform_number_common()
80 jerry_value_t to_number = jerry_value_to_number (js_arg); in jerryx_arg_transform_number_common()
102 jerry_value_t
115 jerry_value_t
129 static jerry_value_t
[all …]
Darg.c37 jerry_value_t
38 jerryx_arg_transform_args (const jerry_value_t *js_arg_p, /**< points to the array with JS argument… in jerryx_arg_transform_args()
43 jerry_value_t ret = jerry_create_undefined (); in jerryx_arg_transform_args()
70 jerry_value_t
71 jerryx_arg_transform_this_and_args (const jerry_value_t this_val, /**< the this_val for the externa… in jerryx_arg_transform_this_and_args()
72 … const jerry_value_t *js_arg_p, /**< points to the array with JS arguments */ in jerryx_arg_transform_this_and_args()
89 jerry_value_t ret = c_arg_p->func (&iterator, c_arg_p); in jerryx_arg_transform_this_and_args()
108 jerry_value_t
109 jerryx_arg_transform_object_properties (const jerry_value_t obj_val,/**< the JS object */ in jerryx_arg_transform_object_properties()
116 jerry_value_t* prop; in jerryx_arg_transform_object_properties()
[all …]
/third_party/jerryscript/jerry-core/api/
Djerry.c65 JERRY_STATIC_ASSERT (sizeof (jerry_value_t) == sizeof (ecma_value_t),
177 static jerry_value_t
178 jerry_return (jerry_value_t value) /**< return value */ in jerry_return()
193 static inline jerry_value_t JERRY_ATTR_ALWAYS_INLINE
194 jerry_throw (jerry_value_t value) /**< return value */ in jerry_throw()
418jerry_value_t parse_ret_val = jerry_parse (NULL, 0, script_source_p, script_source_size, JERRY_PAR… in jerry_run_simple()
422 jerry_value_t run_ret_val = jerry_run (parse_ret_val); in jerry_run_simple()
445 jerry_value_t
519 jerry_value_t
604 jerry_value_t
[all …]
/third_party/jerryscript/jerry-ext/handler/
Dhandler-register.c27 jerry_value_t
31 jerry_value_t global_obj_val = jerry_get_global_object (); in jerryx_handler_register_global()
32 jerry_value_t function_name_val = jerry_create_string (name_p); in jerryx_handler_register_global()
33 jerry_value_t function_val = jerry_create_external_function (handler_p); in jerryx_handler_register_global()
35 jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val); in jerryx_handler_register_global()
61 jerryx_set_properties (const jerry_value_t target_object, /**< target object */ in jerryx_set_properties()
76 jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) entry->name); in jerryx_set_properties()
77 jerry_value_t result = jerry_set_property (target_object, prop_name, entry->value); in jerryx_set_properties()
131 jerry_value_t
132 jerryx_set_property_str (const jerry_value_t target_object, /**< target object */ in jerryx_set_property_str()
[all …]
Dhandler-assert.c31 jerry_value_t
32 jerryx_handler_assert_fatal (const jerry_value_t func_obj_val, /**< function object */ in jerryx_handler_assert_fatal()
33 const jerry_value_t this_p, /**< this arg */ in jerryx_handler_assert_fatal()
34 const jerry_value_t args_p[], /**< function arguments */ in jerryx_handler_assert_fatal()
55 jerry_value_t backtrace_array = jerry_get_backtrace (5); in jerryx_handler_assert_fatal()
60 jerry_value_t property = jerry_get_property_by_index (backtrace_array, idx); in jerryx_handler_assert_fatal()
102 jerry_value_t
103 jerryx_handler_assert_throw (const jerry_value_t func_obj_val, /**< function object */ in jerryx_handler_assert_throw()
104 const jerry_value_t this_p, /**< this arg */ in jerryx_handler_assert_throw()
105 const jerry_value_t args_p[], /**< function arguments */ in jerryx_handler_assert_throw()
[all …]
/third_party/jerryscript/tests/unit-ext/module/
Djerry-module-test.c85 resolve_differently_handled_module (const jerry_value_t name, in resolve_differently_handled_module()
86 jerry_value_t *result) in resolve_differently_handled_module()
112 cache_check (const jerry_value_t name, in cache_check()
113 jerry_value_t *result) in cache_check()
140 static jerry_value_t
141 handle_clear_require_cache (const jerry_value_t js_function, in handle_clear_require_cache()
142 const jerry_value_t this_val, in handle_clear_require_cache()
143 const jerry_value_t args_p[], in handle_clear_require_cache()
156 static jerry_value_t
157 handle_require (const jerry_value_t js_function, in handle_require()
[all …]
/third_party/jerryscript/targets/particle/source/
Dmain.cpp24 static jerry_value_t
25 set_led (const jerry_value_t func_value, /**< function object */ in set_led()
26 const jerry_value_t this_value, /**< this arg */ in set_led()
27 const jerry_value_t *args_p, /**< function arguments */ in set_led()
48 static jerry_value_t
49 js_delay (const jerry_value_t func_value, /**< function object */ in js_delay()
50 const jerry_value_t this_value, /**< this arg */ in js_delay()
51 const jerry_value_t *args_p, /**< function arguments */ in js_delay()
76 jerry_value_t object = jerry_create_object (); in init_jerry()
78 jerry_value_t func_obj; in init_jerry()
[all …]
/third_party/jerryscript/docs/
D02.API-REFERENCE.md218 ## jerry_value_t section in JerryScript types
233 typedef uint32_t jerry_value_t;
263 …e* the VM has been cleaned up. This is a good place to release strong references to jerry_value_t's
395 jerry_value_t value;
398 jerry_value_t getter;
401 jerry_value_t setter;
444 typedef jerry_value_t (*jerry_external_handler_t) (const jerry_value_t function_obj,
445 const jerry_value_t this_val,
446 const jerry_value_t args_p[],
527 typedef bool (*jerry_object_property_foreach_t) (const jerry_value_t property_name,
[all …]

12345