* replace defineOwnProperty with directDefineOwnProperty method
* directly insert new properties for builtin objects
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* check index property set in DerivedObject::defineOwnProperty method only
* index property check is removed for normal Object because PrototypeObject would check it instead
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Implement String with inline buffer. this reduce malloc count & reduce memory usage
* Remove typed-gc-malloc from some classes.
typed malloc classes should have storage for descriptor each malloc.
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>
* replace each Object's member marking with Object::fillGCDescriptor
* BigInt allocation is fixed to be handled by simple GC_MALLOC_ATOMIC call
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>
* remove unused functions
* remove unused variables
* mark necessary but unused variables with UNUSED_VARIABLE
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* GlobalErrorObjectPrototype, DatePrototypeObject, RegExpObjectPrototype, SetPrototypeObject and WeakSetPrototypeObject are removed
* fix some intrinsic prototype object to be an Object instance
* rename prototype class names
* builtin methods of Date are simplified using macro
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>
* during the parsing of regexp, some string objects are dynamically generated
* fix m_captureGroupNames vector to be allocated on GC heap for capturing of these dynamic strings
* m_captureGroupNames would be cleared when YarrPattern deallocated
Signed-off-by: HyukWoo Park <hyukwoo.park@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>
* Reduce size of RopeString
* Use fit memory if possible for ArrayObject fastModeData
* Re-implement ByteCode pruning logic
* Re-implement inline-cache for reducing memory usage
* Remove std::vector with gc_allocator. it can cause memory leak
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Optimize ObjectStructurePropertyDescriptor
* Don't initialize inline storage of VectorWithInlineStorage
* Add Object::setPrototypeForIntrinsicObjectCreation for fast initialize
* Add ArrayObject::ArrayObject(ExecutionState& state, const uint64_t& size) for fast initialize
* Store stack-limit instead of stack-base
* Reduce size of ExecutionState
* Add fast version of Object::ownPropertyKeys for optimize Object.keys
* Add ValueVectorWithInlineStorage
* Remove some compiler warnings
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Divide ObjectStructure into 3 types
* Add transition look up hash map into ObjectStructureWithTransition
* Use faster version of log2 on Vector
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Update yarr (webkitgtk-2.18.5) & import into repo
* Implement new RegExp ES6 error when unicode flag is on
* Fix ignorecase bug on RegExp
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
The function had a wrong behaviour expecting `this` value to be a RegExp Object.
However as the standard says `this` value should be an Object, and its `source` and `pattern` values' `toString()`s should be returned in a form of `/<source>/<flags>`.
Fixes#117
Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
This patch adds RegExp.compile() function.
Since the given argument can be a RegExp object as well, which already has their option flags parsed there was a need to add a new init function which doesn't parse flags and accepts an `unsigned int` as its parameter.
Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>