Skip to content

Commit

Permalink
Rename resource to source for api, document and comments
Browse files Browse the repository at this point in the history
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
  • Loading branch information
lygstate committed Dec 6, 2021
1 parent 51da155 commit 4008053
Show file tree
Hide file tree
Showing 24 changed files with 171 additions and 170 deletions.
26 changes: 13 additions & 13 deletions docs/02.API-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Flags for [jerry_exec_snapshot](#jerry_exec_snapshot) functions:
- JERRY_SNAPSHOT_EXEC_COPY_DATA - copy snapshot data into memory (see below)
- JERRY_SNAPSHOT_EXEC_ALLOW_STATIC - allow executing static snapshots
- JERRY_SNAPSHOT_EXEC_LOAD_AS_FUNCTION - load snapshot as function instead of executing it
- JERRY_SNAPSHOT_EXEC_HAS_RESOURCE - `source_name` field is valid
- JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME - `source_name` field is valid
in [jerry_exec_snapshot_option_values_t](#jerry_exec_snapshot_option_values_t)
- JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE - `user_value` field is valid
in [jerry_exec_snapshot_option_values_t](#jerry_exec_snapshot_option_values_t)
Expand Down Expand Up @@ -560,7 +560,7 @@ typedef struct
uint32_t options; /**< combination of jerry_parse_option_enable_feature_t values */
jerry_value_t argument_list; /**< function argument list if JERRY_PARSE_HAS_ARGUMENT_LIST is set in options
* Note: must be string value */
jerry_value_t source_name; /**< resource name string (usually a file name)
jerry_value_t source_name; /**< source name string (usually a file name)
* if JERRY_PARSE_HAS_SOURCE_NAME is set in options
* Note: must be string value */
uint32_t start_line; /**< start line of the source code if JERRY_PARSE_HAS_START is set in options */
Expand Down Expand Up @@ -626,7 +626,7 @@ Source code location data retrieved by
```c
typedef struct
{
jerry_value_t source_name; /**< resource name */
jerry_value_t source_name; /**< source name */
jerry_size_t line; /**< line index */
jerry_size_t column; /**< column index */
} jerry_frame_location_t;
Expand Down Expand Up @@ -1398,8 +1398,8 @@ Various configuration options for [jerry_exec_snapshot](#jerry_exec_snapshot)
```c
typedef struct
{
jerry_value_t source_name; /**< resource name string (usually a file name)
* if JERRY_SNAPSHOT_EXEC_HAS_RESOURCE is set in exec_snapshot_opts
jerry_value_t source_name; /**< source name string (usually a file name)
* if JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME is set in exec_snapshot_opts
* Note: non-string values are ignored */
jerry_value_t user_value; /**< user value assigned to all functions created by this script including
* eval calls executed by the script if JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE
Expand Down Expand Up @@ -11575,7 +11575,7 @@ main (void)

**Summary**

Get the resource name (usually a file name) of the currently executed script or the given function object.
Get the source name (usually a file name) of the currently executed script or the given function object.

This function is typically called from native callbacks.

Expand All @@ -11592,17 +11592,17 @@ is no longer needed.
jerry_value_t
jerry_source_name (jerry_value_t value);
```
- `value` - api value to obtain the resource name from
- `value` - api value to obtain the source name from
- return string value constructed from
- the currently executed function object's resource name, if the given value is undefined
- resource name of the function object, if the given value is a function object
- the currently executed function object's source name, if the given value is undefined
- source name of the function object, if the given value is a function object
- "<anonymous>", otherwise

*New in version 2.2*.

**Example**

[doctest]: # (name="02.API-REFERENCE-jsresourcename.c")
[doctest]: # (name="02.API-REFERENCE-jssourcename.c")

```c
#include <stdio.h>
Expand All @@ -11628,10 +11628,10 @@ main (void)

jerry_value_t global = jerry_current_realm ();

/* Register the "resourceName" method. */
/* Register the sourceName" method. */
{
jerry_value_t func = jerry_function_external (source_name_handler);
jerry_value_t name = jerry_string_sz ("resourceName");
jerry_value_t name = jerry_string_sz ("sourceName");
jerry_value_t result = jerry_object_set (global, name, func);
jerry_value_free (result);
jerry_value_free (name);
Expand All @@ -11640,7 +11640,7 @@ main (void)

jerry_value_free (global);

const jerry_char_t source[] = "function myFunction() { return resourceName() }; myFunction()";
const jerry_char_t source[] = "function myFunction() { return sourceName() }; myFunction()";

jerry_parse_options_t parse_options;
parse_options.options = JERRY_PARSE_HAS_SOURCE_NAME;
Expand Down
12 changes: 6 additions & 6 deletions docs/07.DEBUGGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Currently, `jerryx_debugger_rp_create ()` for raw packet transport layer and
`jerryx_debugger_serial_create (const char* config)` for serial protocol
are also available.)

The resource name provided to `jerry_parse ()` is used by the client
to identify the resource name of the source code. This resource name
The source name provided to `jerry_parse ()` is used by the client
to identify the source name of the source code. This source name
is usually a file name.

## JerryScript debugger C-API interface
Expand Down Expand Up @@ -103,8 +103,8 @@ typedef jerry_value_t
size_t source_size, void *user_p);
```

- `source_name_p` - resource (usually a file) name of the source code
- `source_name_size` - size of resource name
- `source_name_p` - source (usually a file) name of the source code
- `source_name_size` - size of source name
- `source_p` - source code character data
- `source_size` - size of source code
- `user_p` - custom pointer passed to [jerry_debugger_wait_for_client_source](#jerry_debugger_wait_for_client_source)
Expand Down Expand Up @@ -306,8 +306,8 @@ jerry_debugger_wait_for_client_source (jerry_debugger_wait_for_source_callback_t
* Runs the source code received by jerry_debugger_wait_for_client_source.
*/
static jerry_value_t
wait_for_source_callback (const jerry_char_t *source_name_p, /**< resource name */
size_t source_name_size, /**< size of resource name */
wait_for_source_callback (const jerry_char_t *source_name_p, /**< source name */
size_t source_name_size, /**< size of source name */
const jerry_char_t *source_p, /**< source code */
size_t source_size, /**< source code size */
void *user_p /**< user pointer */)
Expand Down
16 changes: 8 additions & 8 deletions jerry-core/api/jerry-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,10 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
}
#endif /* JERRY_ESNEXT */

#if JERRY_RESOURCE_NAME
/* resource name */
#if JERRY_SOURCE_NAME
/* source name */
extra_bytes += (uint32_t) sizeof (ecma_value_t);
#endif /* JERRY_RESOURCE_NAME */
#endif /* JERRY_SOURCE_NAME */

new_code_size = JERRY_ALIGNUP (new_code_size + extra_bytes, JMEM_ALIGNMENT);

Expand Down Expand Up @@ -880,7 +880,7 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */

uint32_t allowed_opts =
(JERRY_SNAPSHOT_EXEC_COPY_DATA | JERRY_SNAPSHOT_EXEC_ALLOW_STATIC | JERRY_SNAPSHOT_EXEC_LOAD_AS_FUNCTION
| JERRY_SNAPSHOT_EXEC_HAS_RESOURCE | JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE);
| JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME | JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE);

if ((exec_snapshot_opts & ~(allowed_opts)) != 0)
{
Expand Down Expand Up @@ -955,18 +955,18 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */
script_p->realm_p = (ecma_object_t *) JERRY_CONTEXT (global_object_p);
#endif /* JERRY_BUILTIN_REALMS */

#if JERRY_RESOURCE_NAME
ecma_value_t source_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
#if JERRY_SOURCE_NAME
ecma_value_t source_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_SOURCE_NAME_ANON);

if ((exec_snapshot_opts & JERRY_SNAPSHOT_EXEC_HAS_RESOURCE) && option_values_p != NULL
if ((exec_snapshot_opts & JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME) && option_values_p != NULL
&& ecma_is_value_string (option_values_p->source_name) > 0)
{
ecma_ref_ecma_string (ecma_get_string_from_value (option_values_p->source_name));
source_name = option_values_p->source_name;
}

script_p->source_name = source_name;
#endif /* JERRY_RESOURCE_NAME */
#endif /* JERRY_SOURCE_NAME */

#if JERRY_FUNCTION_TO_STRING
script_p->source_code = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);
Expand Down
16 changes: 8 additions & 8 deletions jerry-core/api/jerryscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -5364,19 +5364,19 @@ jerry_frame_is_strict (jerry_frame_t *frame_p) /**< frame pointer */
} /* jerry_frame_is_strict */

/**
* Get the resource name (usually a file name) of the currently executed script or the given function object
* Get the source name (usually a file name) of the currently executed script or the given function object
*
* Note: returned value must be freed with jerry_value_free, when it is no longer needed
*
* @return JS string constructed from
* - the currently executed function object's resource name, if the given value is undefined
* - resource name of the function object, if the given value is a function object
* - the currently executed function object's source name, if the given value is undefined
* - source name of the function object, if the given value is a function object
* - "<anonymous>", otherwise
*/
jerry_value_t
jerry_source_name (const jerry_value_t value) /**< jerry api value */
{
#if JERRY_RESOURCE_NAME
#if JERRY_SOURCE_NAME
if (ecma_is_value_undefined (value) && JERRY_CONTEXT (vm_top_context_p) != NULL)
{
return ecma_copy_value (ecma_get_source_name (JERRY_CONTEXT (vm_top_context_p)->shared_p->bytecode_header_p));
Expand All @@ -5386,16 +5386,16 @@ jerry_source_name (const jerry_value_t value) /**< jerry api value */

if (script_value == JMEM_CP_NULL)
{
return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
return ecma_make_magic_string_value (LIT_MAGIC_STRING_SOURCE_NAME_ANON);
}

const cbc_script_t *script_p = ECMA_GET_INTERNAL_VALUE_POINTER (cbc_script_t, script_value);

return ecma_copy_value (script_p->source_name);
#else /* !JERRY_RESOURCE_NAME */
#else /* !JERRY_SOURCE_NAME */
JERRY_UNUSED (value);
return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
#endif /* JERRY_RESOURCE_NAME */
return ecma_make_magic_string_value (LIT_MAGIC_STRING_SOURCE_NAME_ANON);
#endif /* JERRY_SOURCE_NAME */
} /* jerry_source_name */

/**
Expand Down
6 changes: 3 additions & 3 deletions jerry-core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -716,12 +716,12 @@
#endif /* JERRY_PROMISE_CALLBACK && !JERRY_ESNEXT */

/**
* Resource name related types into a single guard
* Source name related types into a single guard
*/
#if JERRY_LINE_INFO || JERRY_ERROR_MESSAGES || JERRY_MODULE_SYSTEM
#define JERRY_RESOURCE_NAME 1
#define JERRY_SOURCE_NAME 1
#else /* !(JERRY_LINE_INFO || JERRY_ERROR_MESSAGES || JERRY_MODULE_SYSTEM) */
#define JERRY_RESOURCE_NAME 0
#define JERRY_SOURCE_NAME 0
#endif /* JERRY_LINE_INFO || JERRY_ERROR_MESSAGES || JERRY_MODULE_SYSTEM */

#endif /* !JERRYSCRIPT_CONFIG_H */
18 changes: 9 additions & 9 deletions jerry-core/ecma/base/ecma-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,9 +1433,9 @@ ecma_script_deref (ecma_value_t script_value) /**< script value */
}
}

#if JERRY_RESOURCE_NAME
#if JERRY_SOURCE_NAME
ecma_deref_ecma_string (ecma_get_string_from_value (script_p->source_name));
#endif /* JERRY_RESOURCE_NAME */
#endif /* JERRY_SOURCE_NAME */

#if JERRY_MODULE_SYSTEM
if (type & CBC_SCRIPT_HAS_IMPORT_META)
Expand Down Expand Up @@ -1773,27 +1773,27 @@ ecma_compiled_code_get_line_info (const ecma_compiled_code_t *bytecode_header_p)
#endif /* JERRY_LINE_INFO */

/**
* Get the resource name of a compiled code.
* Get the source name of a compiled code.
*
* @return resource name value
* @return source name value
*/
ecma_value_t
ecma_get_source_name (const ecma_compiled_code_t *bytecode_p) /**< compiled code */
{
#if JERRY_RESOURCE_NAME
#if JERRY_SOURCE_NAME
#if JERRY_SNAPSHOT_EXEC
if (JERRY_UNLIKELY (bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))
{
return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
return ecma_make_magic_string_value (LIT_MAGIC_STRING_SOURCE_NAME_ANON);
}
#endif /* JERRY_SNAPSHOT_EXEC */

ecma_value_t script_value = ((cbc_uint8_arguments_t *) bytecode_p)->script_value;
return ECMA_GET_INTERNAL_VALUE_POINTER (cbc_script_t, script_value)->source_name;
#else /* !JERRY_RESOURCE_NAME */
#else /* !JERRY_SOURCE_NAME */
JERRY_UNUSED (bytecode_p);
return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
#endif /* !JERRY_RESOURCE_NAME */
return ecma_make_magic_string_value (LIT_MAGIC_STRING_SOURCE_NAME_ANON);
#endif /* !JERRY_SOURCE_NAME */
} /* ecma_get_source_name */

#if (JERRY_STACK_LIMIT != 0)
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/ecma/operations/ecma-function-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
*
* See also: ECMAScript v6, 9.2.1.1
*
* @return resource name as ecma-string
* @return source name as ecma-string
*/
ecma_value_t
ecma_op_function_form_name (ecma_string_t *prop_name_p, /**< property name */
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/include/jerryscript-debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ typedef enum
/**
* Callback for jerry_debugger_wait_and_run_client_source
*
* The callback receives the resource name, source code and a user pointer.
* The callback receives the source name, source code and a user pointer.
*
* @return this value is passed back by jerry_debugger_wait_and_run_client_source
*/
Expand Down
8 changes: 4 additions & 4 deletions jerry-core/include/jerryscript-snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ typedef enum
JERRY_SNAPSHOT_EXEC_COPY_DATA = (1u << 0), /**< copy snashot data */
JERRY_SNAPSHOT_EXEC_ALLOW_STATIC = (1u << 1), /**< static snapshots allowed */
JERRY_SNAPSHOT_EXEC_LOAD_AS_FUNCTION = (1u << 2), /**< load snapshot as function instead of executing it */
JERRY_SNAPSHOT_EXEC_HAS_RESOURCE = (1u << 3), /**< source_name field is valid
* in jerry_exec_snapshot_option_values_t */
JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME = (1u << 3), /**< source_name field is valid
* in jerry_exec_snapshot_option_values_t */
JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE = (1u << 4), /**< user_value field is valid
* in jerry_exec_snapshot_option_values_t */
} jerry_exec_snapshot_opts_t;
Expand All @@ -56,8 +56,8 @@ typedef enum
*/
typedef struct
{
jerry_value_t source_name; /**< resource name string (usually a file name)
* if JERRY_SNAPSHOT_EXEC_HAS_RESOURCE is set in exec_snapshot_opts
jerry_value_t source_name; /**< source name string (usually a file name)
* if JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME is set in exec_snapshot_opts
* Note: non-string values are ignored */
jerry_value_t user_value; /**< user value assigned to all functions created by this script including
* eval calls executed by the script if JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/include/jerryscript-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ typedef enum
*/
typedef struct
{
jerry_value_t source_name; /**< resource name */
jerry_value_t source_name; /**< source name */
jerry_size_t line; /**< line index */
jerry_size_t column; /**< column index */
} jerry_frame_location_t;
Expand Down
14 changes: 7 additions & 7 deletions jerry-core/lit/lit-magic-strings.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_THROW, "throw")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRUNC, "trunc")
#endif /* JERRY_BUILTIN_MATH && JERRY_ESNEXT */
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUE, "value")
#if JERRY_PARSER && JERRY_RESOURCE_NAME
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RESOURCE_EVAL, "<eval>")
#endif /* JERRY_PARSER && JERRY_RESOURCE_NAME */
#if JERRY_PARSER && JERRY_SOURCE_NAME
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SOURCE_NAME_EVAL, "<eval>")
#endif /* JERRY_PARSER && JERRY_SOURCE_NAME */
#if JERRY_BUILTIN_BIGINT
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIGINT_UL, "BigInt")
#endif /* JERRY_BUILTIN_BIGINT */
Expand Down Expand Up @@ -807,7 +807,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_DATE_UL, "setUTCDate")
#if JERRY_BUILTIN_STRING && JERRY_ESNEXT
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STARTS_WITH, "startsWith")
#endif /* JERRY_BUILTIN_STRING && JERRY_ESNEXT */
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RESOURCE_ANON, "<anonymous>")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SOURCE_NAME_ANON, "<anonymous>")
#if JERRY_BUILTIN_TYPEDARRAY
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_BUFFER_UL, "ArrayBuffer")
#endif /* JERRY_BUILTIN_TYPEDARRAY */
Expand Down Expand Up @@ -1127,8 +1127,8 @@ LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (4, LIT_MAGIC_STRING_LN10_U)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (4, LIT_MAGIC_STRING_NULL_UL)
#endif /* JERRY_BUILTIN_MATH */
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (5, LIT_MAGIC_STRING_ARRAY_UL)
#if JERRY_PARSER && JERRY_RESOURCE_NAME
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_RESOURCE_EVAL)
#if JERRY_PARSER && JERRY_SOURCE_NAME
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_SOURCE_NAME_EVAL)
#elif JERRY_BUILTIN_BIGINT
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_BIGINT_UL)
#elif JERRY_BUILTIN_MATH
Expand Down Expand Up @@ -1170,7 +1170,7 @@ LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_COPY_WITHIN)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_ENUMERABLE)
#endif /* JERRY_BUILTIN_TYPEDARRAY \
|| JERRY_ESNEXT */
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_RESOURCE_ANON)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_SOURCE_NAME_ANON)
#if JERRY_BUILTIN_TYPEDARRAY
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_FLOAT32_ARRAY_UL)
#elif JERRY_BUILTIN_TYPEDARRAY && JERRY_NUMBER_TYPE_FLOAT64
Expand Down
4 changes: 2 additions & 2 deletions jerry-core/lit/lit-magic-strings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ LIT_MAGIC_STRING_ATOMICS_STORE = "store"
LIT_MAGIC_STRING_THROW = "throw"
LIT_MAGIC_STRING_TRUNC = "trunc"
LIT_MAGIC_STRING_VALUE = "value"
LIT_MAGIC_STRING_RESOURCE_EVAL = "<eval>"
LIT_MAGIC_STRING_SOURCE_NAME_EVAL = "<eval>"
LIT_MAGIC_STRING_BIGINT_UL = "BigInt"
LIT_MAGIC_STRING_ERRORS_UL = "errors"
LIT_MAGIC_STRING_LOG10E_U = "LOG10E"
Expand Down Expand Up @@ -323,7 +323,7 @@ LIT_MAGIC_STRING_SET_MINUTES_UL = "setMinutes"
LIT_MAGIC_STRING_SET_SECONDS_UL = "setSeconds"
LIT_MAGIC_STRING_SET_UTC_DATE_UL = "setUTCDate"
LIT_MAGIC_STRING_STARTS_WITH = "startsWith"
LIT_MAGIC_STRING_RESOURCE_ANON = "<anonymous>"
LIT_MAGIC_STRING_SOURCE_NAME_ANON = "<anonymous>"
LIT_MAGIC_STRING_ARRAY_BUFFER_UL = "ArrayBuffer"
LIT_MAGIC_STRING_DESCRIPTION = "description"
LIT_MAGIC_STRING_SYNTAX_ERROR_UL = "SyntaxError"
Expand Down
6 changes: 3 additions & 3 deletions jerry-core/parser/js/byte-code.h
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,9 @@ typedef struct
ecma_object_t *realm_p; /**< realm object */
#endif /* JERRY_BUILTIN_REALMS */
uint32_t refs_and_type; /**< reference counter and type of the function */
#if JERRY_RESOURCE_NAME
ecma_value_t source_name; /**< resource name */
#endif /* JERRY_RESOURCE_NAME */
#if JERRY_SOURCE_NAME
ecma_value_t source_name; /**< source name */
#endif /* JERRY_SOURCE_NAME */
#if JERRY_FUNCTION_TO_STRING
ecma_value_t source_code; /**< source code */
#endif /* JERRY_FUNCTION_TO_STRING */
Expand Down
Loading

0 comments on commit 4008053

Please sign in to comment.