Update the webpage (#2991)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
22babb1718
commit
93509a57e3
+28
-10
@@ -75,8 +75,8 @@ typedef enum
|
||||
* vfprintf(logfile), or both, depending on log level.
|
||||
*
|
||||
* Note:
|
||||
* This port function is called by jerry-core when JERRY_ENABLE_LOGGING is
|
||||
* defined. It is also common practice though to use this function in
|
||||
* This port function is called by jerry-core when JERRY_LOGGING is
|
||||
* enabled. It is also common practice though to use this function in
|
||||
* application code.
|
||||
*/
|
||||
void jerry_port_log (jerry_log_level_t level, const char *fmt, ...);
|
||||
@@ -95,7 +95,8 @@ void jerry_port_print_char (char c);
|
||||
|
||||
### ES2015 Module system helper functions
|
||||
|
||||
The import statement requires two specific functions for opening and closing files (the modules) port specific.
|
||||
The module system requires two specific functions for opening and closing files.
|
||||
It also requires a platform specific way of normalizing file paths.
|
||||
|
||||
```c
|
||||
/**
|
||||
@@ -118,6 +119,23 @@ jerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */
|
||||
{
|
||||
free (buffer_p);
|
||||
} /* jerry_port_release_source */
|
||||
|
||||
/**
|
||||
* Normalize a file path
|
||||
*
|
||||
* @return length of the path written to the output buffer
|
||||
*/
|
||||
size_t
|
||||
jerry_port_normalize_path (const char *in_path_p, /**< input file path */
|
||||
char *out_buf_p, /**< output buffer */
|
||||
size_t out_buf_size, /**< size of output buffer */
|
||||
char *base_file_p) /**< base file path */
|
||||
{
|
||||
// normalize in_path_p by expanding relative paths etc.
|
||||
// if base_file_p is not NULL, in_path_p is relative to that file
|
||||
// write to out_buf_p the normalized path
|
||||
// return length of written path
|
||||
} /* jerry_port_normalize_path */
|
||||
```
|
||||
|
||||
## Date
|
||||
@@ -139,7 +157,7 @@ jerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */
|
||||
*
|
||||
* Note:
|
||||
* This port function is called by jerry-core when
|
||||
* CONFIG_DISABLE_DATE_BUILTIN is _not_ defined. Otherwise this function is
|
||||
* JERRY_BUILTIN_DATE is set to 1. Otherwise this function is
|
||||
* not used.
|
||||
*
|
||||
* @param unix_ms The unix timestamp we want an offset for, given in
|
||||
@@ -161,7 +179,7 @@ double jerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc);
|
||||
*
|
||||
* Note:
|
||||
* This port function is called by jerry-core when
|
||||
* CONFIG_DISABLE_DATE_BUILTIN is _not_ defined. It is also common practice
|
||||
* JERRY_BUILTIN_DATE is set to 1. It is also common practice
|
||||
* in application code to use this function for the initialization of the
|
||||
* random number generator.
|
||||
*
|
||||
@@ -183,7 +201,7 @@ simultaneously.
|
||||
*
|
||||
* Note:
|
||||
* This port function is called by jerry-core when
|
||||
* JERRY_ENABLE_EXTERNAL_CONTEXT is defined. Otherwise this function is not
|
||||
* JERRY_EXTERNAL_CONTEXT is enabled. Otherwise this function is not
|
||||
* used.
|
||||
*
|
||||
* @return the pointer to the engine context.
|
||||
@@ -198,8 +216,8 @@ struct jerry_context_t *jerry_port_get_current_context (void);
|
||||
* Makes the process sleep for a given time.
|
||||
*
|
||||
* Note:
|
||||
* This port function is called by jerry-core when JERRY_DEBUGGER is
|
||||
* defined. Otherwise this function is not used.
|
||||
* This port function is called by jerry-core when JERRY_DEBUGGER is set to 1.
|
||||
* Otherwise this function is not used.
|
||||
*
|
||||
* @param sleep_time milliseconds to sleep.
|
||||
*/
|
||||
@@ -345,7 +363,7 @@ jerry_port_get_current_context (void)
|
||||
#include <unistd.h>
|
||||
#endif /* HAVE_TIME_H */
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
void jerry_port_sleep (uint32_t sleep_time)
|
||||
{
|
||||
#ifdef HAVE_TIME_H
|
||||
@@ -359,5 +377,5 @@ void jerry_port_sleep (uint32_t sleep_time)
|
||||
#endif /* HAVE_TIME_H */
|
||||
(void) sleep_time;
|
||||
} /* jerry_port_sleep */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user