* 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>
* each builtin constructor of intrinsic object gets prototype from GetPrototypeFromConstructor
* Reflect constructor is fixed to pass newTarget to Construct operation
Signed-off-by: HyukWoo Park <hyukwoo.park@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>
* 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>
* Fixup class parsing error check in esprima
* Class cannot have property named 'prototype'
* When define {getter, setter} in interpreter, property key can be symbol
* Reorder properties on class constructor
* Fixup public API
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* add check code for ObjectPattern without AssignmentPropertyList
* handle the case when value of PropertyNode is a MemberExpression
* add generateStoreByteCode module for SpreadElement
* pass related TCs in test262
Signed-off-by: HyukWoo Park <hyukwoo.park@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>
* Optmize String.protype.split function.
when separator comes to RegExpObject split function, we have to call @@split function when there is a @@split function.
old one is correct implementation but performance is bad...
but we already have optmized split function with RegExp in builtinStringSplit.
I make to use old one when if user didn't defined own @@split function.
RegExp test score is changed from 57 to 280 in my computer.
* Make Value::isCallable inline-able.
* Make to use shared data among {Get,Set}GlobalVariable. this may reduce usage & improve performance
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* treat variable in catch() as let
* add lexical environment record data into global environment for saving global permanently
* re-implement variable access bytecode generation
* re-implement class initialize operation
* re-implement global variable access bytecode for support lexcial variables in global
* fix bugs related with per-iteration lexical environment in for-statement
Signed-off-by: seonghyun kim <sh8281.kim@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>
* 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>
* 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>
- bug fixes
* Change types of some errors from TypeError to RangeError
* Get rid of divide-by-zero case
* Fix unsigned-signed comparison code
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
- add m_isExplicitlyDeclaredOrParameterName into name info in ASTScopeContext
- add m_isMutable into IdentifierRecord struct
- add ThrowStaticExcpetion opcode in indexed-mode
- add throw exception code in storeByName operation
2. when evaluate delete operation on member variable, must evaluate toString operation once for name even if exception throws
3. in strict mode, Decimals with leading zero literals are not allowed
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2. merge DeclareFunctionDeclaration, DeclareFunctionDeclarationsInGlobal into DeclareFunctionDeclarations
3. implement EnvironmentRecord::initializeBinding for initialize function decl.
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
- gitlab-ci will not allow SpiderMonkey's failure
- fix typos
- subdivide cases when there is controlflow in 'with' operation
- Function.prototype.call should initialize arguments field even if there isn't any value
- implement Number.prototype.toLocaleString
- construct m_objectPrototypeToString
- upgrade check_tidy.py to print filenames which are not tidy
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
- Add every builtin function templates in es5
- Modification on Makefile target "check" should not trigger rebuild
- Add JSON object
- Implement some toString functions
- Initialize m_value properly in ObjectPropertyDescriptor constructor
2. VariableDeclaratorNode does not affect execute result
3. optimize Object get, set in interpreter
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>