* 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>
Add Object::getIndexedPropertyValue method for achive that
the function removes redundant creation of ObjectGetResult.
And Improve TypedArray object reading performance through better implementation
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* remove useless GC_MALLOC_EXPLICITLY_TYPED
typed-malloc information is allocated with each malloc operation
* Implement fast path for ObjectPropertyName
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* when trying to use index property, we use only 32bit for index value (uint32_t)
* rename ArrayIndex as to Index32 and IndexProperty
* add cctest to verify the new api
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>
* NativeCodeBlock is newly added for NativeFunctionObject
* all interpreter-related info is moved into InterpretedCodeBlock
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>
* caller extension of ArgumentsObject is removed from recent ECMAScript standard
* __proto__ on object expression is changed.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* fix function length to represent the number of consecutive identifiers from the start of parameter list
* collect parameter names including the target names of patterns and rest element
* separate function length and parameter count
* simplify the process of parameter collecting and rename parameter related functions more intuitively
Signed-off-by: HyukWoo Park <hyukwoo.park@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>
* When evaluate for-in, we should call [[Enumerate]] function & we shouldn't literate symbols and non-enumerable names.
* In esprima, we need to reset lastUsingName on {open, close}Block
Signed-off-by: seonghyun kim <sh8281.kim@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>
* CodeBlock has essential parameter name list only
* toString builtin function is fixed to use the entire source instead of body source
* some TCs are fixed upto the spec
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Store ArgumentsObject into Env record with functionObject
* Introduce gc memory leak checker
* Don't save stack pointer in ArgumentsObject
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
Save argc, argv on ExecutionState is enough.
and if function call is end, argv member on env points wrong place.
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* implement mapped/unmapped ArgumentsObject
* passed arguments-related test262 TCs
* ArgumentsObject initially stores its matched values in an inner array (fast mode)
* when a property descriptor changed, ArgumentsObject manages the arg value as its property (slow mode)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
- Store lexcial block informantion in InterpretedCodeBlock.
- If lexcial block has no lexcial variables, we should collapse the block.
- If there is no heap-allocated variables in lexcial environment, we can skip allocation of the environment.
- Implement Indexed storage for lexcial environment.
- Allocate lexcial variables in function stack storage if possible.
Signed-off-by: seonghyun kim <sh8281.kim@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
* 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>
2. divide CodeBlock into CodeBlock and InterpretedCodeBlock for saving memory
3. expand SCANNER_RESULT_POOL_INITIAL_SIZE to 128
4. connect String -> AtomicString with remaining space of String::m_tag
5. optimize Function.bind
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2. evalute function decl in catch correctly
3. give receiver of get, set in interpreter correctly
4. give right StackTrace information in with, try-catch for user
5. fix bug in argument object around get, set variable
Signed-off-by: seonghyun kim <sh8281.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>
2. optimize function calling performance
- change local variable binding order (this, function name first)
- revise opcode table init method
3. remove OpcodeTable::m_reverseTable
4. use shared thrower JSGetterSetter instance for arguments, function object
5. revise Function.prototype.toString for to print function's source
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>