* 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>
* Store array length property in its member variable not value vector
- This can reduce one of GC_MALLOC call if there is not value in ArrayObject other than fastmode value
* Prevent memory leak from VMInstance, Context
* Change vector capacity reserve strategy
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>
* EnumerateObject is reworked and two derived classes are newly added
* Object spread element is handled through EnumerateObjectWithDestruction
* for-in operation is handled through EnumerateObjectWithIteration
Signed-off-by: HyukWoo Park <hyukwoo.park@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>
* In Proxy's defineOwnProperty, set settingConfigFalse to true if desc has a [[Configurable]] field and if desc.[[Configurable]] is false
* Use a length properly according to spec at each sort implementations
* Ignore tests where the only reason for the test failure is an error message difference
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Close iterator when throwing an error
* Clamp the Uint8ClampedArray value properly.
* pass more spidermonkey tests
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* spread is allocated on an array object in advance to know the entire length of array when it is used in array initializer
* spread array is fixed fast mode array which means that Array.prototype could not affect any array operation of spread array
* pass v8 TCs
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
Also the Object.[[Get]] method is modified to follow the standard requirements without recursion.
Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
* Revise hasProperty and apply it everywhere
* Add hasIndexedProperty for performance
* Change Object::nextIndex{Forward, Backward} double parameter types into int for performance
* in String.prototype.replace, Use test fast path correctly & use old method because newer method cannot support regexp correctly(old method is faster)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* first, convert to non-fast-mode and then, set non-extensible
* preventExtensions api is also updated
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* updated proxy methods
GetPrototypeOf
SetPrototypeOf
IsExtensible
PreventExtensions
GetOwnProperty
DefineOwnProperty
HasProperty
Get
Set
Delete
ProxyCreate
* TODO
Enumerate and OwnPropertyKeys
Call and Construct
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
There's no need to put an assertion there because:
- The ArrayObject's length can be changed even when it's not extensible, it just fills the Array with empty values.
- Modifying the length of an ArrayObject should not throw an error, the only time it should when an element is pushed to a non-extensible ArrayObject.
Fixes#33
Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2. If setObjectPreComputedCase decides to make no more caches because of many cacheMisses, it should invalidate previous caches
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
- add member m_outerLimitCount into class ControlFlowRecord to save tryStatementScopeCount of the jump destination
* fix bug in Array.prototype.concat()
- It will check the length of the array overflows or not
* fix bug in setting __proto__
- when setting __proto__ to non-object, non-null, non-undefined value, it should do nothing
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2. revise Array.prototype.{splice, slice, shift, unshift}
3. change Object::nextIndexForward, Object::nextIndexBackward to return existence of index
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* "length" property of ArrayObject is treated with special flow when defined
* fix bugs in Object::defineOwnProperty() which occured when "value" property is not given
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
Now,
- GCutil has bdwgc and general GC Utilities (LeakChecker, allocator
wrapper)
- src/heap has Escargot-dependent functions (Custom Allocator,
LeakCheckerBridge for global function support)
2. disable thread function in bdwgc
3. remove m_version from ObjectStructure
4. add rawBuffer in TypedArrayObject
5. remove wrong usage of Value::toArrayIndex and Value::toIndex
6. optimize String::tryToUseAsArrayIndex, String::tryToUseAsIndex
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
- hasArgumentsBindingInParameterOrChildFD is computed every function calling before
2. computing ExtendedNodeLOC bug with global CodeBlock when source code has comment at the front
3. add default object structor for arguments object
4. implement Object::getIndexedProperty, Object::setIndexedProperty
5. use SmallValueVector in Env record instead of ValueVector
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2. optimize String::find
3. expand ESCARGOT_ASCII_TABLE_MAX to 256
4. implement ArrayObject::fastGetObject, ArrayObject::fastSetObject for fast ArrayObject access in native source
5. optimize Array.prototype.spice, Array.prototype.push... with ArrayObject::fastGetObject, ArrayObject::fastSetObject
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>