* Use PhantomReference and ReferenceQueue instead of finalizer.
finalizer could be called by another thread like FinalizerDaemon and it is deprecated.
* Remove NativePointerHolder::destroy function.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* ErrorThrowCallback is invoked when an Error is thrown
* ErrorThrowCallback overwrites the result of ErrorCreationCallback
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* String::emptyString is the default string value of empty AtomicString
* so, mark emptyString as source of AtomicString too
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* we can choose JS source code for debugging target
* selectively generating debugging byte code (breakpoint)
* add debugger init option (--skip=) to exclude certain source code from debugging
* rename debugger functions
* explicitly present the python version for debugger tool
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* 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>
* 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>
* we need to reset ByteCodeBlock only for normal functions
* add assertion to check invalid operation
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* 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>
* 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>
* 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>
* manage global variables as VMInstance static members
* access global variables through VMInstance static functions
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* 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>
* 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>
* 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>
* 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>
* 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>