Skip to content

Commit 3fe93ff

Browse files
committed
New Allocator and improved String handling.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
1 parent cadc81d commit 3fe93ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1282
-4227
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ project (Jerry CXX C ASM)
222222

223223
# Compiler / Linker flags
224224
set(COMPILE_FLAGS_JERRY "-fno-builtin")
225+
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
226+
set(COMPILE_FLAGS_JERRY "${COMPILE_FLAGS_JERRY} -DMEM_HEAP_PTR_64")
227+
endif()
225228
if(NOT ("${PLATFORM}" STREQUAL "DARWIN"))
226229
set(LINKER_FLAGS_COMMON "-Wl,-z,noexecstack")
227230
endif()

jerry-core/config.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
* Size of heap
4343
*/
4444
#ifndef CONFIG_MEM_HEAP_AREA_SIZE
45-
# define CONFIG_MEM_HEAP_AREA_SIZE (256 * 1024)
46-
#elif CONFIG_MEM_HEAP_AREA_SIZE > (256 * 1024)
47-
# error "Currently, maximum 256 kilobytes heap size is supported"
45+
# define CONFIG_MEM_HEAP_AREA_SIZE (512 * 1024)
46+
#elif CONFIG_MEM_HEAP_AREA_SIZE > (512 * 1024)
47+
# error "Currently, maximum 512 kilobytes heap size is supported"
4848
#endif /* !CONFIG_MEM_HEAP_AREA_SIZE */
4949

5050
/**
5151
* Desired limit of heap usage
5252
*/
53-
#define CONFIG_MEM_HEAP_DESIRED_LIMIT (CONFIG_MEM_HEAP_AREA_SIZE / 32)
53+
#define CONFIG_MEM_HEAP_DESIRED_LIMIT (JERRY_MIN(CONFIG_MEM_HEAP_AREA_SIZE / 32, 8192))
5454

5555
/**
5656
* Log2 of maximum possible offset in the heap
@@ -62,7 +62,7 @@
6262
*
6363
* On the other hand, value 2 ^ CONFIG_MEM_HEAP_OFFSET_LOG should not be less than CONFIG_MEM_HEAP_AREA_SIZE.
6464
*/
65-
#define CONFIG_MEM_HEAP_OFFSET_LOG (18)
65+
#define CONFIG_MEM_HEAP_OFFSET_LOG (19)
6666

6767
/**
6868
* Number of lower bits in key of literal hash table.
@@ -80,7 +80,7 @@
8080
* Also the option affects size of ECMA Object Model's data types.
8181
* In any case size of any of the types should not exceed CONFIG_MEM_POOL_CHUNK_SIZE.
8282
*/
83-
#define CONFIG_ECMA_REFERENCE_COUNTER_WIDTH (10)
83+
#define CONFIG_ECMA_REFERENCE_COUNTER_WIDTH (9)
8484

8585
/**
8686
* Maximum length of strings' concatenation

jerry-core/ecma/base/ecma-globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ typedef struct ecma_object_t
455455
*/
456456
#define ECMA_OBJECT_OBJ_TYPE_POS (ECMA_OBJECT_OBJ_EXTENSIBLE_POS + \
457457
ECMA_OBJECT_OBJ_EXTENSIBLE_WIDTH)
458-
#define ECMA_OBJECT_OBJ_TYPE_WIDTH (4)
458+
#define ECMA_OBJECT_OBJ_TYPE_WIDTH (3)
459459

460460
/**
461461
* Compressed pointer to prototype object (ecma_object_t)

0 commit comments

Comments
 (0)