- The debugger callbacks are implemented as class
- Using std::vector for storing data
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.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>
* https://www.ecma-international.org/ecma-262/#sec-IsHTMLDDA-internal-slot
* IsHTMLDDA internal slot is an ECMAScript feature for Web Browsers
* IsHTMLDDA is currently enabled only for test mode (we can enable it later if it is really used by third party app)
* some related operations are optionally fixed
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>
* 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>
* Implement one of parsing error of module
* Fix one of stack usage error on FunctionObjectInlines
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* isArray is updated as an internal method of Object
* legacy internalClassProperty is nowhere to be used
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Many JS Frameworks or librarys use `function.apply(<any>, arguments)` pattern.
but this statement generate arguments object. generateing arguments object is very expensive.
we can optimize simple cases like `function() { fn.apply(this, arguments); }`
* Merge many ByteCode opcodes into CallFunctionComplexCase.
* Do gc when allocate large ArrayBuferObject
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Compress CompressibleStrings on GC reclaim end event
- if there is reference about data of CompressibleString on stack, we should give up compressing.
we don't need to search heap space because I redesigned StringView
(we should not store string buffer data on heap without owner)
* Redesign StringView
- Don't save string buffer address as its member. because buffer of CompressibleString can be deleted
- If we don't save string buffer address on StringView, parser performance may dropped.
becuase parser access string data a lot.
so I introduce ParserStringView. it saves buffer address. we should ParserStringView on parser only.
we can save string buffer address while parsing. because GC is disabled while parsing.
* Enable CompressibleString always
* Implement cache of RegExpOptionStrings
* Implement finding system locale function on RuntimeICUBinder avoiding call uloc_getDefault.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* add CompressibleString to compress/decompress large-sized source code
* add ENABLE_SOURCE_COMPRESSION flag (you can use the CompressibleString by build with -DENABLE_SOURCE_COMPRESSION flag)
* use lz4 compression algorithm (from https://github.com/lz4/lz4, the latest release v1.9.2)
- add Escargot::LZ4 namespace
- pull included lib header files out of Escargot::LZ4 namespace
- code format changed by tools/check_tidy.py
* default outdir in config.cmake removed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Fixup canDeclareName in ASTContext
* Add more callstack information on API
* Add onDelete callback on VMInstance
* Add BloomFilter as util
* Use BloomFilter in ASTFunctionContext for find out variable name existence
* Optimize parser using InlineStorageVector
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Revise AST Node allocation through ASTPool
* ASTAllocator is newly added for allocation of AST Nodes
* AST Node is allocated in pool memory and flushed once after bytecode is generated
* All reference counting overhead related to AST Node is removed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Reduce memory operations in Parsing
* empty vector called SyntaxNodeVector is added for SyntaxChecker
* ASTFunctionScopeContext and ASTBlockScopeContext are allocated in ast pool instead of GC heap
* memory leak(ShellPlatform) in shell is fixed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Fix BDWGC compile option
* Fix build error on ndk
* Global declared function declaration should always create binding
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Store child {ASTFunctionContext, InterpretedCodeBlock} as linked-list
* Reduce size of ScannerResult
* Remove Parser::scopeContexts
* Fix compile error in old system
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Don't allocate new StringView on parser if possible
* Store esprima::Context::firstCoverInitializedNameError as pointer. it can reduce copy cost on esprima::*CoverGrammar
* Make Script as reexcutable if possible
* Don't save parsed source codes
- Remove SourceStringView
- When create AtomicString from StringView, we should make new string data instead of reference StringView
* Reduce size of StringBufferAccessData
* Fix crash in toString of FunctionObject.
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Rename ESCARGOT_OUTPUT=bin into shell and make shell_test for testing.
* Remove ESCARGOT_SHELL, -SCARGOT_STANDALONE and Rename ESCARGOT_ENABLE_VENDORTEST into ESCARGOT_ENABLE_TEST.
* Fix bug in PersistentRefHolder
* Add DebuggerStatementNode for preventing parsing error even if we cannot support
* Revise Platform layer for supporting es6 module
* Implmenent class constructor toString
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Use a byteLength when creating new TypedArray from another TypedArray.
* Keep the isLexicallyDeclaredBindingInitialization value when generating storeBytecode on ArrayPatternNode
* Pass more SpiderMonkeyTCs
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* PointerValueRef should inherit ValueRef
* Implement PersistentRefHolder for easy-rooting
* Remove SandBox interface for public
* Re-implement shell through public API
* Implement Platform for supprot various platform easily
* Add many missed public API methods(Set, Map, Symbol...)
* Add Memory class into public
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>