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>