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>
* Store CodeCache for function in same file with Script where it is located
* Implement load function ByteCode when loading Script
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Compute stack limit correctly through pthread API or Windows internal API
* Store stack limit in TLS(or global) not a VMInstance or ExecutionState
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* when computuing byteLength of ArrayBuffer,
we should use 64-bit integer regard to overflow
* Adding missing ASTAllocator::clear
* Proxy object should care infinity loop
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* if there is too big expression, bytecode generation can be failed
* fix some errors on 64-bit platform through using int
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* `initializeFunctionScript` API is added
* unlike dynamically created function, `initializeFunctionScript` supports debugger
* origin line offset is added for correct source code calculation in debugger
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>
* turn on parserEnable flag in ScriptParser only
* Always store breakpointLocations in debugger(debugger can be turn on later)
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
- The debugger callbacks are implemented as class
- Using std::vector for storing data
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.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>
* 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>
* wrap initializer expr into virtual arrow function like instance field
* users can access super property in eval
Signed-off-by: Seonghyun Kim <sh8281.kim@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>
* 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>
* extract infrequently used m_rareData member from InterpretedCodeBlock
* InterpretedCodeBlockWithRareData handles InterpretedCodeBlockRareData inside itself
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>