Commit graph

1,336 commits

Author SHA1 Message Date
HyukWoo Park
205b5f35bd Print compress/decompress info
* show source code size and tick (time) of each compression/decompression

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-09-28 15:29:15 +09:00
HyukWoo Park
d1535b2088 Update measurement of source code size for the code compression
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-01-27 21:18:18 +09:00
HyukWoo Park
a771419d0c Update measurement of source code size in the time line for origin mode
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-01-18 19:44:24 +09:00
HyukWoo Park
dfba6d6bd5 Fix compression measurement
* fix conflict in compression which is GC_free should be invoked during GC is enabled
* add GC overhead profile
* add memory dump interval option

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-01-03 13:25:56 +09:00
Boram Bae
e80a414017 Add an option to dump memory usage
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
2021-12-16 13:40:50 +09:00
HyukWoo Park
0eaf50714b Fix nested compression case
* code compression could trigger another GC when it allocates compressed string on the heap
* disable GC while code compression working

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-12-15 18:34:42 +09:00
HyukWoo Park
b51839b7b9 Add reference counter in CompressibleString
* remove stack searching to check if CompressibleString is in use
* add ref counter instead

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-12-10 18:48:35 +09:00
HyukWoo Park
73e5e66b4a Update HeapProfile to collect heap information during the runtime
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-26 16:06:20 +09:00
HyukWoo Park
bcdbaa4bac Allocate heap space for temporal buffer used while compresison/decompression
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-26 15:30:08 +09:00
HyukWoo Park
e3fe51cf14 Allocate string buffer of CompressibleString in the heap
* to test CompressibleString's effect on GC heap

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-24 17:55:59 +09:00
Zoltan Herczeg
d79eb6f9e1 Hide debugger enabled from public use.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-23 16:51:06 +09:00
Zoltan Herczeg
e3b1a9f5e6 Introduce abstract base class for debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-23 10:52:17 +09:00
HyukWoo Park
12c91f055c Fix atomic operations
* simplify atomicOperation function
* merge all atomic operations into SharedArrayBufferObject's member function
* fix slice builtin method to correctly perform operation atomically

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-22 15:02:25 +09:00
HyukWoo Park
ab15bd5574 Implement setIndexedPropertyHandler for ObjectTemplate
* rename data related to PropertyHandler
* refactoring ObjectWithPropertyHandler to handle NamedProperty and IndexedProperty both
* add cctest

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-17 17:22:35 +09:00
HyukWoo Park
fa052c8902 Refactoring ObjectTemplate's PropertyHandler
* update to common PropertyHandler data and strucuture to represent IndexedProperty and NamedProperty both
* check property name in each ObjectWithPropertyHandler method

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-17 17:22:35 +09:00
Zoltan Herczeg
67131c43cd Fix execution resume after setting a breakpoint.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-15 12:02:37 +09:00
HyukWoo Park
5784b5096d Implement getter built-in methods of growable SharedArrayBuffer
* implement internal resizable sharedarray data
* update growable and maxByteLength getter builtin methods

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-11 15:20:43 +09:00
HyukWoo Park
ba8b499800 Trivial defect fix
* replace toPropertyKey with ObjectPropertyName constructor
* remove unused MetaNode in parsing

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-11 09:44:00 +09:00
HyukWoo Park
c295ee69e1 Refactoring createFunctionSourceFromScriptSource
* use memcpy for string merging
* remove unused functions

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-10 14:52:54 +09:00
HyukWoo Park
239e0683f8 Enable created function's format check only for non-reloadable string in test mode
* format check requires double-parsing for the same source string
* format check is necessary to filter out a few format cases only
* in general mode, format check is limited to speed up the function creation process

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-10 14:52:54 +09:00
HyukWoo Park
f47def1f22 Replace TemplatePropertyName with existing ObjectStructurePropertyName
* usually property name is delivered as Value format
* replace `TemplatePropertyName` with `ObjectStructurePropertyName` to handle Value format nicely

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-10 14:51:47 +09:00
HyukWoo Park
30f3b3a348 Revise createFunctionSourceFromScriptSource
* add simple syntax checker method in parser to check parameters and body string
* fix it to check parameters and body string seperately
* add several TCs for this patch too

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-01 17:03:58 +09:00
Seonghyun Kim
8986e222f4 Fix compile error on gcc version 5
gcc version 5 cannot decide how many bits are require for enum well
if there is enum has type. it generates warning but we don't need to set type into enum for gcc 5

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-29 12:38:57 +09:00
HyukWoo Park
4366a01196 Update customized logging
* enabled by ESCARGOT_USE_CUSTOM_LOGGING flag
* user can registers customized logging through Platform's inherited functions

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-10-29 12:30:46 +09:00
HyukWoo Park
18449ff9a6 Implement resizable ArrayBuffer
* update some new features of resizable ArrayBuffer

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-10-29 12:30:32 +09:00
SeongHyun Kim
c1a5a53bb7 Mark enum as unsigned
we need to mark enum as unsigned.
because processing enum in msvc is little different

ex) enum Type { A, B }
struct Foo { Type type: 1; }
Foo f; f.type = 1;
if (f.type == Type::B) { puts("failed in msvc."); }

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-28 12:21:12 +09:00
SeongHyun Kim
110359e4db Update source & build files for windows
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
Signed-off-by: SeongHyun Kim <sh8281.kim@samsung.com>
2021-10-25 18:48:10 +09:00
Seonghyun Kim
eeb15679c5 we should reset firstCoverInitializedNameError when skipping arrow function in parser
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-25 13:55:02 +09:00
HyukWoo Park
01d6ed1047 Fix Template to inherit parent's NativeDataAccessorProperties
* according to api, ObjectTemplate should inherit its parent's NativeDataAccessorProperties of InstanceTemplate too

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-10-18 15:16:25 +09:00
Seonghyun Kim
848873c6c7 Implement special case for Function constructor with ReloadableString
* Add new api for Function::create

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-18 13:34:28 +09:00
Seonghyun Kim
765ccac4d7 Fix compile error in release mode with debugger
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-18 13:34:28 +09:00
HyukWoo Park
711d75f500 Fix minor defects
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-10-14 18:37:06 +09:00
Seonghyun Kim
b6b0c9a1b6 We should notify what length means stringLength or bufferLength
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-14 18:30:52 +09:00
Seonghyun Kim
1091bcecd9 Cache of lastBreakpointInfo in ByteCodeGenerator is not always advancing
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-10-14 18:30:52 +09:00
Ryan Hyun Choi
e479b456a9 Fix SharedArrayBuffer's create()
* Enable threading in api-test
* Add a SharedArrayBuffer test

Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2021-10-14 16:43:10 +09:00
Zoltan Herczeg
c2ab3e1f3d Implement backtrace recording for Promise.then calls
Furthermore rework detection of recorded backtrace.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-12 12:32:49 +09:00
HyukWoo Park
9f156c6dc6 Fix minor gcc build errors
* for gcc version >= 9.3.0
* fix errors about -Werror=class-memaccess and -Werror=ignored-qualifiers

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-10-08 16:46:59 +09:00
HyukWoo Park
aef7ba0c98 Update GC event callback registration
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-10-07 08:39:04 +09:00
Zoltan Herczeg
1dff039743 Implement backtrace recording for the debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-06 11:43:19 +09:00
Seonghyun Kim
a30b318b4a Implement GenericIteratorObject
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-09-29 16:15:21 +09:00
HyukWoo Park
d369ca50b0 Fix clang build errors
* fix some tiny errors in wasm
* update wasm version to 1.0.24
* run tidy check in actions

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-29 14:35:44 +09:00
Seonghyun Kim
458d7a2e4c Remove useless global variables in Intl
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-09-27 16:40:21 +09:00
Seonghyun Kim
5185932e6d Implement Intl.ListFormat
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-09-27 16:40:21 +09:00
Seonghyun Kim
988492a339 Add toStringTag into Intl Object
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-09-27 16:40:21 +09:00
HyukWoo Park
659745ceed Store function name value correctly to access it in inner function scope
* handle exceptional case of function name which is that function name needs to be allocated on the heap with other lexical variables

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-27 16:38:22 +09:00
HyukWoo Park
843f4af78e Assign source name for dynamically created functions
* get source name through outer lexical scope

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-27 16:37:12 +09:00
HyukWoo Park
faa56e648d Fix typo about gotException in ModuleExecutionResult
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-27 16:37:12 +09:00
HyukWoo Park
07c91a33e6 Add callback for Error creation
* registered callback is triggered for each Error constructor call

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-14 16:39:15 +09:00
HyukWoo Park
f864d828fb Refactoring BackingStore structure
* divide BackingStore structure into NonShared and Shared
* update BackingStoreRef API to clarify its usage

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-14 15:54:17 +09:00
HyukWoo Park
1a258a0635 Add SharedArrayBufferObject create api
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-14 15:54:17 +09:00