* 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>
* Fixup canDeclareName in ASTContext
* Add more callstack information on API
* Add onDelete callback on VMInstance
* Add BloomFilter as util
* Use BloomFilter in ASTFunctionContext for find out variable name existence
* Optimize parser using InlineStorageVector
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Revise AST Node allocation through ASTPool
* ASTAllocator is newly added for allocation of AST Nodes
* AST Node is allocated in pool memory and flushed once after bytecode is generated
* All reference counting overhead related to AST Node is removed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Reduce memory operations in Parsing
* empty vector called SyntaxNodeVector is added for SyntaxChecker
* ASTFunctionScopeContext and ASTBlockScopeContext are allocated in ast pool instead of GC heap
* memory leak(ShellPlatform) in shell is fixed
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* PointerValueRef should inherit ValueRef
* Implement PersistentRefHolder for easy-rooting
* Remove SandBox interface for public
* Re-implement shell through public API
* Implement Platform for supprot various platform easily
* Add many missed public API methods(Set, Map, Symbol...)
* Add Memory class into public
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>
* 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>
* add BoundFunctionObject class to represent bound function object
* fix hasInstance operation according to ES6
Signed-off-by: HyukWoo Park <hyukwoo.park@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>
Added an undefined native setter to prevent nullptr dereference when calling the setter of an accessor property descriptor.
Fixes#130
Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
* Use non-universal compiler options for gcc only
Compiler of macOS (clang) doesn't support all options currently
used. Optimization flags `-frounding-math` and `-fsignaling-nans`
are not supported, while warning options
`-Wno-unused-but-set-variable` and `-Wno-unused-but-set-parameter`
are unknown.
Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
* Remove deprecated register storage class specifier
The storage class specifier `register` was deprecated in C++11 (and
is incompatible with C++17, where the keyword is unused and
reserved).
Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
* Remove extraneous parentheses from around equality comparison
Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
* Don't use memcpy on PointerValue objects
Class `PointerValue` and its descendants are dynamic classes, their
instances have a vtable pointer. C functions like `memcpy` know
nothing about C++ classes and object memory layouts, so using
C-style memory access to C++ objects with vtable pointers makes the
compiler complain.
This patch replaces `memcpy` with a more C++-ish approach.
Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
- type-punned pointer error
use memory copy not casting
- rewrite string variable use for format in snprintf
Signed-off-by: DongHeon Jung <dheon.jung@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. Fix bug on Array.prototype.splice()
3. Add a member variable holding locale information into VMInstance
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>
2. implement ThrowStaticErrorOperation
3. optimize Get,SetObjectOpcode
4. optimize builtinArrayConstructor, Concat
5. implement SmallValue::fromValueForCtor it gives better performance when creating SmallValue from Value
6. add m_tag in String it gives the way to find typeof PointerValue without virtual function calling.
we can remove this member variable when our project is ported into small device it has small memory
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* Manage a corner case in computing node LOC from bytecode
* Change the VM's timezoneID setting to be lazy (because of a memory usage)
* Fix some bugs on DateObject operation
Signed-off-by: Saebom Kim sae-bom.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>
* Reserved (1LL << 63) for representing NaN in DateObject
- and removed most of double type variables
* Removed leftovers of 'struct tm'
* Set cachedUTC for quick UTC conversion
* Fixed bugs in
- Date.prototype.setFullYear() with NaN value
- Date.prototype.setUTCString()
- Date.prototype.toTimeString() with 30-minute or 45-minute timezone
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2. implicitly delete AST when ast is useless
3. allocate String::emptyString correctly
4. hide ptr in LeakChecker for better tracing
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>