From d1cbb8ac94fea4860c4d18e33bddbe38e70024aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Lang=C3=B3?= Date: Thu, 9 Feb 2017 16:03:15 +0100 Subject: [PATCH] Documentation update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com --- docs/01.GETTING-STARTED.md | 35 +++++++++++++++++++++++++++++++++-- docs/02.API-REFERENCE.md | 22 +++++++++++++++++----- 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/docs/01.GETTING-STARTED.md b/docs/01.GETTING-STARTED.md index 02776a2890..f416259499 100644 --- a/docs/01.GETTING-STARTED.md +++ b/docs/01.GETTING-STARTED.md @@ -45,10 +45,10 @@ python tools/build.py --debug --lto=off python tools/build.py --cmake-param=CMAKE_PARAM ``` -**Set a profile mode (full, minimal)** +**Set a profile mode (ES5.1, subset of ES2015, minimal)** ```bash -python tools/build.py --feature=full|minimal +python tools/build.py --profile=es5.1|es2015-subset|minimal ``` **Use (jerry, compiler-default, external) libc** @@ -81,6 +81,37 @@ For example the cross-compile to RaspberryPi 2 is something like this: python tools/build.py --toolchain=cmake/toolchain_linux_armv7l.cmake ``` +**Use system memory allocator** + +```bash +python tools/build.py --system-allocator=on --jerry-libc=off +``` + +*Note*: System allocator is only supported on 32 bit systems. + +**Enable 32bit compressed pointers** + +```bash +python tools/build.py --cpointer-32bit=on +``` + +*Note*: There is no compression/decompression on 32 bit systems, if enabled. + +**Change default heap size (512K)** + +```bash +python tools/build.py --mem-heap=256 +``` + +If you would like to use more than 512K, then you must enable the 32 bit compressed pointers. + +```bash +python tools/build.py --cpointer-32bit=on --mem-heap=1024 +``` + +*Note*: The heap size will be allocated statically at compile time, when JerryScript memory +allocator is used. + **To get a list of all the available buildoptions for Linux** ```bash diff --git a/docs/02.API-REFERENCE.md b/docs/02.API-REFERENCE.md index 7620349b23..fdaac5965e 100644 --- a/docs/02.API-REFERENCE.md +++ b/docs/02.API-REFERENCE.md @@ -1316,10 +1316,13 @@ jerry_get_utf8_string_length (const jerry_value_t value); **Summary** -Copy the characters of a string into a specified buffer. The -'\0' character could occur in character buffer. Returns 0, -if the value parameter is not a string or the buffer is -not large enough for the whole string. +Copy the characters of a string into a specified cesu-8 buffer. +The '\0' character could occur in the character buffer. Returns 0, +if the value parameter is not a string or the buffer is not large +enough for the whole string. + +*Note*: Does not put '\0' to the end of string, the return value identifies +the number of valid bytes in the output buffer. **Prototype** @@ -1362,9 +1365,12 @@ jerry_string_to_char_buffer (const jerry_value_t value, Copy the characters of a string into a specified utf-8 buffer. The '\0' character could occur in character buffer. Returns 0, -if the value parameter is not a string or the buffer isn't +if the value parameter is not a string or the buffer is not large enough for the whole string. +*Note*: Does not put '\0' to the end of string, the return value identifies +the number of valid bytes in the output buffer. + **Prototype** ```c @@ -1410,6 +1416,9 @@ parameter is not a string. It will extract the substring between the specified start position and the end position (or the end of the string, whichever comes first). +*Note*: Does not put '\0' to the end of string, the return value identifies +the number of valid bytes in the output buffer. + **Prototype** ```c @@ -1462,6 +1471,9 @@ parameter is not a string. It will extract the substring between the specified start position and the end position (or the end of the string, whichever comes first). +*Note*: Does not put '\0' to the end of string, the return value identifies +the number of valid bytes in the output buffer. + **Prototype** ```c