* 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>
* Finding & read desc at once in ObjectStructure
* Improve findProperty performance in ObjectStructure
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>
* Make ArgumentsObject light
* Implement lazy-creation of FunctionObject.prototype
* Don't copy ObjectStructor when executing Object::enumeration
* Use GC_REALLOC on Object, ArrayObject
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>
* Create a property only when each field of desc presents at fromObjectPropertyDescriptor
* Add a ArrayIteratorPrototypeObject
* Call iteratorClose correctly at Array.from
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>
Related methods:
- Array.isArray
- JSON.stringify
- JSON.parse
- Object.prototype.toString
Also fixed some errors in the Promise builtin rotuines to enable more tests.
Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
* in ES6, we need to set function name when object literal has function expression on right side
* in ES6, we should not check duplicated property name on object literal
* Refactor Object::hasInstance & Object::getMethod
Signed-off-by: seonghyun kim <sh8281.kim@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>
- We should not heap allocated env on...
* functions uses variable on upper function
* functions have `typeof` operation
* functions have unmapped arguments object
- Improve calling function performance by remove accessing vtable once in interpreter(from isCallable, call to just call)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Fix a bug that the results of [[OwnPropertyKeys]]() were not sorted correctly
* Add internal test and Pass more test262 tests
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Use OrdinaryHasProperty at Object::hasProperty
* Override enumeration for ProxyObject
* Pass more test262 tests
* Exclude test262 tests related to Proxy's enumerate because of that is deprecated in ECMAScript 8.0
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor some Object's builtin functions
* Add an ownPropertyKeys public api (getOwnPropertyKeys is deprecated)
* Reimplement Object::enumerateObjectOwnProperies according to spec
* Implement createListFromArrayLike
* Pass more test262 tests
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Revise [[call]], [[construct]] as described in spec
* Remove m_homeObject in FunctionObject.
* Implement ScriptClass{Constructor, Method}FunctionObject
this subclass is used for saving [[homeObject]] and implement [[call]], [[consturct]]
* Add more(NewTargetBinder, ReturnValueBinder) into FunctionObjectProcessCallGenerator
* Remove feCounter in ByteCodeGenerationProcess. in ES6, function expression order & evaluation order can differ
* Add CallSuper ByteCode for interpret `super()` in class constructor
* Remove isOngoingSuperCall in ExecutionState
* Remove BuiltinFunctionObject. that was unnecessary
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
There are so many features in FunctionObject. so I separate FunctionObject into multiple classes.
* Implement FunctionObjectProcessCallGenerator class for generate processCall code for each derived FunctionObject and implement [[call]], [[construct]] separately
* Implement NativeFunctionObject, BuiltinFunctionObject for process NativeCall separately
* Implement ScriptArrowFunctionObject for process `this` separately
* TODO : ScriptClassMethodFunctionObject, ScriptGeneratorFunctionObject.
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* isFunction is replaced with isCallable check function
* call operations in Promise / TypedArray are fixed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
State without Context is rare, and the merged structure consumes less amount of memory.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
* add BoundFunctionObject class to represent bound function object
* fix hasInstance operation according to ES6
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* left should not be assignmentexpression in for-of statement
* this object for iterator operation fixed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* from, of, get species builtin methods of TypedArray updated
* isCallable and isConstructor modified to commonly used in Value
* Symbol species also updated
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* implement getIterator, iteratorNext, iteratorComplete, iteratorValue, iteratorStep, iteratorClose, createIterResultObject method
* fix to correctly use iterator operations based on the ES2015 spec
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>
Pass an undefined value as Property Descriptor's `value` property if the previous descriptor's value was not present.
Co-authored-by: Robert Fancsik <frobert@inf.u-szeged.hu>
Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu