since calling __tls_get_addr performace is too bad, we should r/w TLS variables with special offset
users can turn on this feature with ESCARGOT_ENABLE_TLS_ACCESS_BY_ADDRESS flag
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
Divice get object inline cache into simple and complex cases
the simple case should test just one object chain with plain data property
the complex case should consider every case of inline cache
Signed-off-by: Seonghyun Kim <sh8281.kim@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>
* Each chain piece represents one of class
* User can uses private member with same name parent with child class
* We should check nearest [[homeObject]] of function to find where function is located
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* add CodeCache routine for ComplexSetObjectOperation and ComplexGetObjectOperation
* fix to use c++ style cast
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* add relocation case for freeze function address
* remove empty strings from ByteCode and ByteCodeBlock literal list
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>
* remove unused functions
* remove unused variables
* mark necessary but unused variables with UNUSED_VARIABLE
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* first, try to lock cache directory to enable CodeCache
* if file I/O fails, stop caching and remove all cache files
* flush and sync files when writing cache
* add tests to check file error cases
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>
* CodeCache generates one meta file and data file for each JS file
* enable coverity scan to check CodeCache too
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* handle ThrowStaticErrorOperation bytecode with default error message
* LoadRegexp bytecode could have empty string as its option string
* test on new-es benchmarks
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* ByteCodeBlock does not hold location data info anymore
* location data of each bytecode is manually allocated only for stack-tracing or debugger mode
* duplicated String allocation for source code is removed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>