/third_party/jerryscript/tests/unit-core/ |
D | test-string-to-number.cpp | 50 const jerry_char_t *strings[] = 52 (const jerry_char_t *) "1", 53 (const jerry_char_t *) "0.5", 54 (const jerry_char_t *) "12345", 55 (const jerry_char_t *) "1e-45", 56 (const jerry_char_t *) "-2.5e+38", 57 (const jerry_char_t *) "-2.5e38", 58 (const jerry_char_t *) "- 2.5e+38", 59 (const jerry_char_t *) "-2 .5e+38", 60 (const jerry_char_t *) "-2. 5e+38", [all …]
|
D | test-api-strings.cpp | 26 const jerry_char_t is_equal_src[] = "var isEqual = function(a, b) { return (a === b); }; isEqual"; in strict_equals() 75 args[0] = jerry_create_string ((jerry_char_t *) ""); 83 args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) "\x73\x74\x72\x3a \xf0\x90\x90\x80"); 84 args[1] = jerry_create_string ((jerry_char_t *) "\x73\x74\x72\x3a \xed\xa0\x81\xed\xb0\x80"); 93 jerry_string_to_char_buffer (args[0], (jerry_char_t *) string_from_utf8, utf8_sz); 94 jerry_string_to_char_buffer (args[1], (jerry_char_t *) string_from_cesu8, cesu8_sz); 103 args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) "\x73\x74\x72\x3a \xf0\x90\x90\x80"); 104 args[1] = jerry_create_string ((jerry_char_t *) "\x73\x74\x72\x3a \xed\xa0\x81\xed\xb0\x80"); 118 jerry_string_to_utf8_char_buffer (args[0], (jerry_char_t *) string_from_utf8_string, utf8_sz); 119 jerry_string_to_utf8_char_buffer (args[1], (jerry_char_t *) string_from_cesu8_string, cesu8_sz); [all …]
|
D | test-api-binary-operations-comparisons.cpp | 65 jerry_value_t obj1 = jerry_eval ((const jerry_char_t *) "o={x:1};o", 9, JERRY_PARSE_NO_OPTS); 66 jerry_value_t obj2 = jerry_eval ((const jerry_char_t *) "o={x:1};o", 9, JERRY_PARSE_NO_OPTS); 67 jerry_value_t err1 = jerry_create_error (JERRY_ERROR_SYNTAX, (const jerry_char_t *) "error"); 77 jerry_create_string ((const jerry_char_t *) "example string"), 78 jerry_create_string ((const jerry_char_t *) "example string"), 81 jerry_create_string ((const jerry_char_t *) "example string"), 85 jerry_create_string ((const jerry_char_t *) "example string"), 89 jerry_create_string ((const jerry_char_t *) "example string"), 109 jerry_create_string ((const jerry_char_t *) "example string"), 118 jerry_create_string ((const jerry_char_t *) "example string"), [all …]
|
D | test-api-binary-operations-arithmetics.cpp | 85 jerry_value_t obj1 = jerry_eval ((const jerry_char_t *) "o={x:1};o", 9, JERRY_PARSE_NO_OPTS); 86 jerry_value_t obj2 = jerry_eval ((const jerry_char_t *) "o={x:1};o", 9, JERRY_PARSE_NO_OPTS); 87 jerry_value_t err1 = jerry_create_error (JERRY_ERROR_SYNTAX, (const jerry_char_t *) "error"); 98 …T_ARI (jerry_create_string ((const jerry_char_t *) "foo"), jerry_create_string ((const jerry_char_… 99 T_ARI (jerry_create_string ((const jerry_char_t *) "foo"), jerry_create_undefined ()), 100 T_ARI (jerry_create_string ((const jerry_char_t *) "foo"), jerry_create_null ()), 101 T_ARI (jerry_create_string ((const jerry_char_t *) "foo"), jerry_create_number (5.0)), 102 T_ARI (jerry_create_undefined (), jerry_create_string ((const jerry_char_t *) "foo")), 103 T_ARI (jerry_create_null (), jerry_create_string ((const jerry_char_t *) "foo")), 104 T_ARI (jerry_create_number (5.0), jerry_create_string ((const jerry_char_t *) "foo")), [all …]
|
D | test-api.cpp | 23 const jerry_char_t test_source[] = TEST_STRING_LITERAL ( 84 (jerry_char_t *) buffer, in handler() 91 return jerry_create_string ((jerry_char_t *) "string from handler"); in handler() 103 return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) "error"); in handler_throw_test() 157 jerry_value_t field_name = jerry_create_string ((jerry_char_t *) "value_field"); in handler_construct() 217 const jerry_char_t *magic_string_items[] = 220 (const jerry_char_t *) jerry_magic_string_ex_ ## NAME, 233 jerry_size_t sz = jerry_string_to_char_buffer (name, (jerry_char_t *) str_buf_p, 128); in foreach() 266 (jerry_char_t *) str_buf_p, in foreach() 285 jerry_size_t sz = jerry_string_to_char_buffer (name, (jerry_char_t *) str_buf_p, 128); in foreach_exception() [all …]
|
D | test-resource-name.cpp | 81 jerry_value_t name = jerry_create_string ((const jerry_char_t *) "resourceName"); 99 jerry_value_t program = jerry_parse ((const jerry_char_t *) resource_1, 101 (const jerry_char_t *) source_1, 111 jerry_value_t resource1_name_value = jerry_create_string ((const jerry_char_t *) resource_1); 130 program = jerry_parse ((const jerry_char_t *) resource_2, 132 (const jerry_char_t *) source_2, 142 jerry_value_t resource2_name_value = jerry_create_string ((const jerry_char_t *) resource_2);
|
D | test-objects-foreach.cpp | 38 jerry_value_t map_str = jerry_create_string ((const jerry_char_t *) "Map"); 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() 119 jerry_value_t internal_prop_name = jerry_create_string ((const jerry_char_t *) "hidden_foo"); in test_internal_prop() 150 static const jerry_char_t strict_equal_source[] = "var x = function(a, b) {return a === b;}; x"; 251 jerry_value_t property_name = jerry_create_string ((jerry_char_t *) "xyzzy");
|
D | test-api-binary-operations-instanceof.cpp | 82 jerry_value_t prototype_str = jerry_create_string ((const jerry_char_t *) "prototype"); 119 …T (jerry_create_string ((const jerry_char_t *) ""), jerry_create_string ((const jerry_char_t *) ""… 120 T (jerry_create_string ((const jerry_char_t *) ""), jerry_create_number (5.0), true), 121 T (jerry_create_number (5.0), jerry_create_string ((const jerry_char_t *) ""), true), 126 T (jerry_create_object (), jerry_create_string ((const jerry_char_t *) ""), true)
|
D | test-abort.cpp | 34 jerry_value_t value = jerry_create_string ((jerry_char_t *) "Abort run!"); in callback_func() 72 jerry_value_t callback_name = jerry_create_string ((jerry_char_t *) "callback"); 82 const jerry_char_t inf_loop_code_src1[] = TEST_STRING_LITERAL ( 108 const jerry_char_t inf_loop_code_src2[] = TEST_STRING_LITERAL ( 144 jerry_value_t value = jerry_create_string ((jerry_char_t *) "Error description");
|
/third_party/jerryscript/jerry-core/include/ |
D | jerryscript-core.h | 143 typedef uint8_t jerry_char_t; typedef 353 void jerry_register_magic_strings (const jerry_char_t * const *ex_str_items_p, 364 bool jerry_run_simple (const jerry_char_t *script_source_p, size_t script_source_size, jerry_init_f… 365 jerry_value_t jerry_parse (const jerry_char_t *resource_name_p, size_t resource_name_length, 366 const jerry_char_t *source_p, size_t source_size, uint32_t parse_opts); 367 jerry_value_t jerry_parse_function (const jerry_char_t *resource_name_p, size_t resource_name_lengt… 368 const jerry_char_t *arg_list_p, size_t arg_list_size, 369 … const jerry_char_t *source_p, size_t source_size, uint32_t parse_opts); 371 jerry_value_t jerry_eval (const jerry_char_t *source_p, size_t source_size, uint32_t parse_opts); 454 jerry_size_t jerry_string_to_char_buffer (const jerry_value_t value, jerry_char_t *buffer_p, jerry_… [all …]
|
D | jerryscript-snapshot.h | 56 jerry_value_t jerry_generate_snapshot (const jerry_char_t *resource_name_p, size_t resource_name_le… 57 const jerry_char_t *source_p, size_t source_size, 59 jerry_value_t jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, size_t resourc… 60 const jerry_char_t *source_p, size_t source_size, 61 const jerry_char_t *args_p, size_t args_size, 74 … jerry_char_t *lit_buf_p, size_t lit_buf_size, bool is_c_format);
|
D | jerryscript-debugger.h | 54 typedef jerry_value_t (*jerry_debugger_wait_for_source_callback_t) (const jerry_char_t *resource_na… 56 const jerry_char_t *source_p, 69 void jerry_debugger_send_output (const jerry_char_t *buffer, jerry_size_t str_size); 70 void jerry_debugger_send_log (jerry_log_level_t level, const jerry_char_t *buffer, jerry_size_t str…
|
/third_party/jerryscript/jerry-ext/module/ |
D | module.c | 24 static const jerry_char_t *module_name_property_name = (jerry_char_t *) "moduleName"; 25 static const jerry_char_t *module_not_found = (jerry_char_t *) "Module not found"; 26 static const jerry_char_t *module_name_not_string = (jerry_char_t *) "Module name is not a string"; 38 const jerry_char_t *message, /**< the error message */ in jerryx_module_create_error() 173 static const jerry_char_t *on_resolve_absent = (jerry_char_t *) "Module on_resolve () must not be N… 186 jerry_char_t* name_string; in jerryx_resolve_native_module() 191 name_string = (jerry_char_t*) jerry_vla_malloc (sizeof(jerry_char_t) * name_size); in jerryx_resolve_native_module() 198 JERRY_VLA (jerry_char_t, name_string, name_size); in jerryx_resolve_native_module()
|
/third_party/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/ |
D | InterruptIn-js.cpp | 60 … (const jerry_char_t *) "Failed to get native InterruptIn pointer"); in DECLARE_CLASS_FUNCTION() 65 jerry_value_t property_name = jerry_create_string((const jerry_char_t*)"cb_rise"); in DECLARE_CLASS_FUNCTION() 89 … (const jerry_char_t *) "Failed to get native InterruptIn pointer"); in DECLARE_CLASS_FUNCTION() 101 jerry_value_t property_name = jerry_create_string((const jerry_char_t*)"cb_rise"); in DECLARE_CLASS_FUNCTION() 125 … (const jerry_char_t *) "Failed to get native InterruptIn pointer"); in DECLARE_CLASS_FUNCTION() 130 jerry_value_t property_name = jerry_create_string((const jerry_char_t*)"cb_fall"); in DECLARE_CLASS_FUNCTION() 154 … (const jerry_char_t *) "Failed to get native InterruptIn pointer"); in DECLARE_CLASS_FUNCTION() 166 jerry_value_t property_name = jerry_create_string((const jerry_char_t*)"cb_fall"); in DECLARE_CLASS_FUNCTION() 189 … (const jerry_char_t *) "Failed to get native InterruptIn pointer"); in DECLARE_CLASS_FUNCTION() 213 … (const jerry_char_t *) "Failed to get native InterruptIn pointer"); in DECLARE_CLASS_FUNCTION() [all …]
|
D | PwmOut-js.cpp | 59 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 92 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 120 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 146 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 172 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 198 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 224 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION() 250 (const jerry_char_t *) "Failed to get native PwmOut pointer"); in DECLARE_CLASS_FUNCTION()
|
D | I2C-js.cpp | 56 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION() 98 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION() 119 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION() 156 … return jerry_create_error(JERRY_ERROR_COMMON, reinterpret_cast<const jerry_char_t *>(error_msg)); in DECLARE_CLASS_FUNCTION() 193 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION() 216 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION() 256 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION() 279 (const jerry_char_t *) "Failed to get native I2C pointer"); in DECLARE_CLASS_FUNCTION()
|
/third_party/jerryscript/tests/unit-ext/ |
D | test-ext-method-register.c | 51 jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) target_prop); in freeze_property() 98 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 106 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 114 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 122 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 130 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 138 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 145 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 153 jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0); in test_simple_registration() 253 jerry_value_t prop_ok_val = jerry_create_string ((const jerry_char_t *) prop_ok); in test_error_multiple_functions() [all …]
|
D | test-ext-module-canonical.c | 29 JERRY_VLA (jerry_char_t, name_string, name_size + 1); in get_canonical_name() 39 return jerry_create_string ((jerry_char_t *) ACTUAL_NAME); in get_canonical_name() 51 JERRY_VLA (jerry_char_t, name_string, name_size + 1); in resolve() 81 jerry_value_t actual_name = jerry_create_string ((jerry_char_t *) ACTUAL_NAME); in main() 82 jerry_value_t alias_name = jerry_create_string ((jerry_char_t *) ALIAS_NAME); in main() 91 jerry_value_t prop_name = jerry_create_string ((jerry_char_t *) "something"); in main()
|
D | test-ext-module-empty.c | 27 jerry_char_t buffer[256]; in main() 35 module_name = jerry_create_string ((jerry_char_t *) "some-unknown-module-name"); in main() 43 jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) "message"); in main() 58 prop_name = jerry_create_string ((const jerry_char_t *) "moduleName"); in main()
|
/third_party/jerryscript/jerry-ext/arg/ |
D | arg-transform-functions.c | 59 (jerry_char_t *) "It is not a number."); in jerryx_arg_transform_number_strict_common() 87 (jerry_char_t *) "It can not be converted to a number."); in jerryx_arg_transform_number_common() 138 (jerry_char_t *) "The number is NaN."); in jerryx_arg_helper_process_double() 146 (jerry_char_t *) "The number is out of range."); in jerryx_arg_helper_process_double() 227 (jerry_char_t *) "It is not a boolean."); in JERRYX_ARG_TRANSFORM_FUNC_FOR_INT() 268 jerry_char_t *target_p = (jerry_char_t *) c_arg_p->dest; in jerryx_arg_string_to_buffer_common_routine() 291 (jerry_char_t *) "Buffer size is not large enough."); in jerryx_arg_string_to_buffer_common_routine() 315 (jerry_char_t *) "It is not a string."); in jerryx_arg_transform_string_strict_common() 341 (jerry_char_t *) "It can not be converted to a string."); in jerryx_arg_transform_string_common() 429 (jerry_char_t *) "It is not a function."); in jerryx_arg_transform_function() [all …]
|
D | arg.c | 95 return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) "'this' validation failed."); in jerryx_arg_transform_this_and_args() 110 … const jerry_char_t **name_p, /**< property name list of the JS object */ in jerryx_arg_transform_object_properties() 121 return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) "Not an object."); in jerryx_arg_transform_object_properties() 128 return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) "malloc prop fail."); in jerryx_arg_transform_object_properties() 184 return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) "Not an array."); in jerryx_arg_transform_array() 191 return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) "malloc arr fail."); in jerryx_arg_transform_array()
|
/third_party/jerryscript/jerry-main/ |
D | main-unix.c | 99 jerry_char_t err_str_buf[256]; in print_unhandled_exception() 103 jerry_value_t stack_str = jerry_create_string ((const jerry_char_t *) "stack"); in print_unhandled_exception() 167 jerry_char_t *string_end_p = err_str_buf + string_end; in print_unhandled_exception() 174 for (jerry_char_t *current_p = err_str_buf; current_p < string_end_p; current_p++) in print_unhandled_exception() 271 …jerry_value_t result_val = jerryx_handler_register_global ((const jerry_char_t *) name_p, handler_… in register_js_function() 289 wait_for_source_callback (const jerry_char_t *resource_name_p, /**< resource name */ in wait_for_source_callback() 291 const jerry_char_t *source_p, /**< source code */ in wait_for_source_callback() 711 … ret_value = jerry_create_error (JERRY_ERROR_COMMON, (jerry_char_t *) "Snapshot file load error"); in main() 736 const jerry_char_t *source_p = (jerry_char_t *) read_file (file_names[i], &source_size); in main() 740 … ret_value = jerry_create_error (JERRY_ERROR_COMMON, (jerry_char_t *) "Source file load error"); in main() [all …]
|
/third_party/jerryscript/docs/ |
D | 16.MIGRATION-GUIDE.md | 25 - `jerry_char_ptr_t` usage replaced with `jerry_char_t *` 280 the first argument's base type `jerry_char_ptr_t` was changed to `jerry_char_t*`. 310 static const jerry_char_t *magic_string_items[] = { 311 (const jerry_char_t *) "magicstring1", 312 (const jerry_char_t *) "magicstring2", 313 (const jerry_char_t *) "magicstring3" 315 …uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_t *… 336 …const jerry_char_t *code_to_snapshot_p = (const jerry_char_t *) "(function () { return 'string fro… 354 …const jerry_char_t *code_to_snapshot_p = (const jerry_char_t *) "(function () { return 'string fro… 389 const jerry_char_t *args_p = (const jerry_char_t *) "a, b"; [all …]
|
/third_party/jerryscript/targets/nuttx-stm32f4/ |
D | jerry_main.c | 164 jerry_char_t err_str_buf[256]; in print_unhandled_exception() 183 jerry_char_t *string_end_p = err_str_buf + sz; in print_unhandled_exception() 190 for (jerry_char_t *current_p = err_str_buf; current_p < string_end_p; current_p++) in print_unhandled_exception() 229 const jerry_char_t *source_p = read_file (path_str_p, &source_size); in print_unhandled_exception() 286 …jerry_value_t result_val = jerryx_handler_register_global ((const jerry_char_t *) name_p, handler_… in register_js_function() 398 const jerry_char_t script[] = "var str = 'Hello World'; print(str + ' from JerryScript')"; in main() 412 const jerry_char_t *source_p = read_file (file_names[i], &source_size); in main() 420 ret_value = jerry_parse ((jerry_char_t *) file_names[i], in main()
|
/third_party/jerryscript/jerry-ext/handler/ |
D | handler-register.c | 28 jerryx_handler_register_global (const jerry_char_t *name_p, /**< name of the function */ in jerryx_handler_register_global() 76 jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) entry->name); in jerryx_set_properties() 136 jerry_value_t property_name_val = jerry_create_string_from_utf8 ((const jerry_char_t *) name); in jerryx_set_property_str() 159 jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) name); in jerryx_get_property_str() 183 jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) name); in jerryx_has_property_str()
|