Commit graph

112 commits

Author SHA1 Message Date
HyukWoo Park
716ff17dd7 Update PromiseRejectCallback
* PromiseRejectCallback is invoked when a Promise is rejected but it does not have any reject handler

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-03-10 15:35:36 +09:00
HyukWoo Park
375e2b7dc2 Update version of WASM engine
* enable exception in wabt engine because Escargot function invoked from wasm function could trigger an exception
* fix compile warning
* fix Thread to be reclaimed after each wasm function call
* extend wasm gc interval

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-02-22 10:06:37 +09:00
SeongHyun Kim
0af32fafde Implement build for Windows UWP
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-01-12 13:44:04 +09:00
HyukWoo Park
f0b058ec5b Fix ByteCodeBlock nullify in gc callback
* we need to reset ByteCodeBlock only for normal functions
* add assertion to check invalid operation

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-01-11 17:31:48 +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
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
Seonghyun Kim
5185932e6d Implement Intl.ListFormat
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-09-27 16:40:21 +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
Seonghyun Kim
155d9b6e95 Implement constructor and getResolvedOptions of Intl.DisplayNames
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-09-09 09:41:01 +09:00
HyukWoo Park
a91417a38c Reorganize builtin and Intl source files
* make builtins and intl directory

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-08-06 13:16:58 +09:00
HyukWoo Park
13c774e49f Add ThreadLocal structure
* ThreadLocal manage global values allocated for each thread
* Update PlatformRef to allow users to add thread-local custom data

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-07-27 16:40:08 +09:00
HyukWoo Park
98bc107937 Add Global object shared by all threads
* Platform is also managed in Global object
* Global has life time same to program

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-07-27 16:40:08 +09:00
Seonghyun Kim
77a68579a5 Implement per thread isolating
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-15 17:47:41 +09:00
HyukWoo Park
ac2bb84b6f Update PromiseHook
* PromiseHook is triggered for each Promise event
* PromiseHook is registered and used by third party app

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-07-15 10:54:18 +09:00
Seonghyun Kim
1fbaf749bf Implement ObjectPrivateMemberStructre for reducing memory usage
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-01 16:36:39 +09:00
HyukWoo Park
b504600e41 Add collecting heap process for WASM
* periodically check and collect WASM heap using GC event

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-05-17 15:28:03 +09:00
Seonghyun Kim
5192d33431 Object Data Accessor property can be act like JavaScript getter setter
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-05-03 19:02:49 +09:00
HyukWoo Park
5517dbf80a Remove unused variables and functions
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-29 09:30:06 +09:00
HyukWoo Park
8f4b125b22 Revise Jump bytecode and JumpFlowRecord for CodeCache
* remove JumpByteCode and add JumpFlowRecord which has no pointer value
* simplify JumpFlowRecord data caching
* fix coverity issue
* add log message for code cache

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-18 10:24:44 +09:00
HyukWoo Park
fabdc578d9 Fix to get the code cache directory through api function
* fix coverity issue too

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-16 11:48:02 +09:00
HyukWoo Park
e9afc5c595 Update VMInstance global variables
* manage global variables as VMInstance static members
* access global variables through VMInstance static functions

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-15 15:24:50 +09:00
HyukWoo Park
2b775dc2f5 Revise BigInt not to hold VMInstance pointer
* bf_context_t is now defined as a global variable and maintained during the runtime
* VMInstance::finalize is invoked at the end of program to guarantee the life time of bf_context_t

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-10 12:29:55 +09:00
bence gabor kis
160cb37300 Update name and length property order
also fixed few test262 test-case

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2021-02-22 12:17:24 +09:00
HyukWoo Park
90522697eb Refactoring Job
* all types of job now handled in the task queue

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-02-16 09:34:31 +09:00
Seonghyun Kim
d088f0416e class should define name before define prototype
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-28 14:37:35 +09:00
HyukWoo Park
29c70f7532 Update clang-format version to 6.0
* coding convention fixed following the new clang-format

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-12-18 11:13:15 +09:00
HyukWoo Park
e998d04bf6 Implement WebAssembly.validate
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-11-23 14:05:36 +09:00
Seonghyun Kim
5fae029277 Remove unused variable & Fix memory leak from VMInstance::m_cachedUTC
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-11-23 13:53:29 +09:00
Seonghyun Kim
c6452d6d0c Fix build error related with libbf
* Don't delete generator, asyncs ByteCodeBlock

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-23 13:04:13 +09:00
MuHong Byun
827d09454d Fix several bugs on
* Data object
* ByteCodeInterpreter

(From Seonghyun Kim <sh8281.kim@samsung.com>)

Signed-off-by: MuHong Byun <mh.byun@samsung.com>
2020-10-23 10:52:58 +09:00
Seonghyun Kim
9c9457ea38 Implement BigInt infrastructure
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-14 16:18:53 +09:00
HyukWoo Park
8c41696eec Fix CodeCache clear to be invoked immediately
* CodeCache holds a lock of cache directory that should be released immediately when it is no longer necessary
* since GC may reclaim VMInstance and its CodeCache member lazily, so destructor of CodeCache could be called later too
* invoke CodeCache clear() in clearCachesRelatedWithContext method to resolve this issue

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-10-12 14:11:38 +09:00
HyukWoo Park
ae21ea534b Update CodeCache file management
* calculate cache file directory based on $HOME env
* handle all cache list in one file
* use source code's hash value for its cache data file name

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-09-16 18:27:30 +09:00
Seonghyun Kim
d4bfe59e64 Update public API for RopeString and update small config
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-28 10:26:20 +09:00
Seonghyun Kim
267238ae64 Fix Reloadable string bug
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-13 15:17:32 +09:00
Seonghyun Kim
4e9349b999 Implement ReloadableString
* turn off ALWAYS_INLINE in small config
* turn off hidden class transition table in small config

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-13 14:07:37 +09:00
Seonghyun Kim
ccdf475f9b Implement new config for smaller device
* In small config, we turn off SyntaxChecker for small binary size
* CompressibleString should get VMInstance instead of Context
* If ICU is disabled, we don't need unicode information in yarr
* Remove unused variable in yarr(RegExpJitTables)
* Fix lz4 compile error

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-06 14:07:11 +09:00
Seonghyun Kim
3ec80377db Add new public APIs
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-30 15:15:18 +09:00
HyukWoo Park
436fac4423 Implement CodeCache for CodeBlock tree
* update read/write modules for CodeCache
* store and load CodeBlock tree

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-30 10:44:40 +09:00
Seonghyun Kim
906dbc6409 Add new api for Template
* Embedders can control (ESCARGOT_COMPRESSIBLE_COMPRESS_*) when compiling

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-17 11:30:04 +09:00
Seonghyun Kim
f82c81a5d2 In 64bit, we should use only 32bit for addressing
* Object, Array, Environment record internal space should use 32bit addressing on 64bit
* Rename SmallValue to EncodedValue.
* Implement EncodedSmallValue for using 32bit address on 64bit
* Implement special vectors for EncodedSmallValue.
  - we need these special vector. because when push_back or inserting the value what we want to insert
  can be removed by GC because the parameter type is 32bit(EncodedSmallValue).
* Update GCutil for 32bit addressing on 64bit

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-11 17:37:43 +09:00
Seonghyun Kim
6bfa3f9fff Apply lazy StaticString on builtin Intl
* Implement FromExternalMemory version of AtomicString

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-04 17:12:07 +09:00
Seonghyun Kim
5b3f0986b1 Implement lazy part of StaticString
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-04 17:12:07 +09:00
Seonghyun Kim
a58a01e02f Implement Intl.RelativeTimeFormat
* Each Context should share supported intl locale array

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-08 18:04:38 +09:00
HyukWoo Park
d46a365326 Refactoring type check operations using tag comparison
* type check operations based on tag comparison are updated to be aggresively inlined replacing virtual function calls
* Object, String and Symbol use pre-defined tag values while other uses vtable address as its tag value

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-04-09 16:13:36 +09:00
HyukWoo Park
39a5922437 Fix [[Prototype]] initialization process for each object creation
* remove duplicated initialization for [[Prototype]] internal slot
* initialize prototype value directly when each Object created
* each prototype candidate object should be first marked as prototype object
* setGlobalIntrinsicObject marks fixed structure and prototype for global object's intrinsic object initialization

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-03-24 18:26:25 +09:00
Seonghyun Kim
cf2c21e023 Implement additional ECMAScript Features for Web Browsers
* caller extension of ArgumentsObject is removed from recent ECMAScript standard
* __proto__ on object expression is changed.

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-03-18 16:57:42 +09:00
MuHong Byun
e2f1c3f47d Fix LGPL License verison typo (2.0 -> 2.1)
Signed-off-by: MuHong Byun <mh.byun@samsung.com>
2020-03-10 11:35:20 +09:00
Zoltan Herczeg
a555ac52f6 Initial implementation of the Escargot Debugger. 2020-03-05 10:36:55 +09:00
bence gabor kis
94c74a0c3d Newfeature - DotAll flag
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-01-17 10:45:43 +09:00