Skip to content

Commit 32674ff

Browse files
authored
Documentation update (#1573)
JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
1 parent bfc5bee commit 32674ff

File tree

2 files changed

+50
-7
lines changed

2 files changed

+50
-7
lines changed

docs/01.GETTING-STARTED.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ python tools/build.py --debug --lto=off
4545
python tools/build.py --cmake-param=CMAKE_PARAM
4646
```
4747

48-
**Set a profile mode (full, minimal)**
48+
**Set a profile mode (ES5.1, subset of ES2015, minimal)**
4949

5050
```bash
51-
python tools/build.py --feature=full|minimal
51+
python tools/build.py --profile=es5.1|es2015-subset|minimal
5252
```
5353

5454
**Use (jerry, compiler-default, external) libc**
@@ -81,6 +81,37 @@ For example the cross-compile to RaspberryPi 2 is something like this:
8181
python tools/build.py --toolchain=cmake/toolchain_linux_armv7l.cmake
8282
```
8383

84+
**Use system memory allocator**
85+
86+
```bash
87+
python tools/build.py --system-allocator=on --jerry-libc=off
88+
```
89+
90+
*Note*: System allocator is only supported on 32 bit systems.
91+
92+
**Enable 32bit compressed pointers**
93+
94+
```bash
95+
python tools/build.py --cpointer-32bit=on
96+
```
97+
98+
*Note*: There is no compression/decompression on 32 bit systems, if enabled.
99+
100+
**Change default heap size (512K)**
101+
102+
```bash
103+
python tools/build.py --mem-heap=256
104+
```
105+
106+
If you would like to use more than 512K, then you must enable the 32 bit compressed pointers.
107+
108+
```bash
109+
python tools/build.py --cpointer-32bit=on --mem-heap=1024
110+
```
111+
112+
*Note*: The heap size will be allocated statically at compile time, when JerryScript memory
113+
allocator is used.
114+
84115
**To get a list of all the available buildoptions for Linux**
85116

86117
```bash

docs/02.API-REFERENCE.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,10 +1316,13 @@ jerry_get_utf8_string_length (const jerry_value_t value);
13161316

13171317
**Summary**
13181318

1319-
Copy the characters of a string into a specified buffer. The
1320-
'\0' character could occur in character buffer. Returns 0,
1321-
if the value parameter is not a string or the buffer is
1322-
not large enough for the whole string.
1319+
Copy the characters of a string into a specified cesu-8 buffer.
1320+
The '\0' character could occur in the character buffer. Returns 0,
1321+
if the value parameter is not a string or the buffer is not large
1322+
enough for the whole string.
1323+
1324+
*Note*: Does not put '\0' to the end of string, the return value identifies
1325+
the number of valid bytes in the output buffer.
13231326

13241327
**Prototype**
13251328

@@ -1362,9 +1365,12 @@ jerry_string_to_char_buffer (const jerry_value_t value,
13621365

13631366
Copy the characters of a string into a specified utf-8 buffer.
13641367
The '\0' character could occur in character buffer. Returns 0,
1365-
if the value parameter is not a string or the buffer isn't
1368+
if the value parameter is not a string or the buffer is not
13661369
large enough for the whole string.
13671370

1371+
*Note*: Does not put '\0' to the end of string, the return value identifies
1372+
the number of valid bytes in the output buffer.
1373+
13681374
**Prototype**
13691375

13701376
```c
@@ -1410,6 +1416,9 @@ parameter is not a string. It will extract the substring between the
14101416
specified start position and the end position (or the end of the string,
14111417
whichever comes first).
14121418

1419+
*Note*: Does not put '\0' to the end of string, the return value identifies
1420+
the number of valid bytes in the output buffer.
1421+
14131422
**Prototype**
14141423

14151424
```c
@@ -1462,6 +1471,9 @@ parameter is not a string. It will extract the substring between the specified
14621471
start position and the end position (or the end of the string, whichever
14631472
comes first).
14641473

1474+
*Note*: Does not put '\0' to the end of string, the return value identifies
1475+
the number of valid bytes in the output buffer.
1476+
14651477
**Prototype**
14661478

14671479
```c

0 commit comments

Comments
 (0)