* 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>
* 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>
* 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>
* 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>
* 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>