Commit graph

33 commits

Author SHA1 Message Date
Daniel Balla
3f65bb2e76 Add undefined native setter function (#138)
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>
2019-03-11 12:02:41 +09:00
Akos Kiss
8f6925acc7 Fix warnings reported during compilation on macOS (#32)
* 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>
2019-01-02 17:48:01 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
70afb08b5a Optimize vector, esprima_cpp, bytecode generating (#170)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-12-07 14:21:38 +09:00
박혁우/Tizen Platform Lab(SR)/Staff Engineer/삼성전자
42eee4e35b Implement Arrow Function[ES6] (#162)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2018-11-14 11:29:18 +09:00
정동헌/Tizen Platform Lab(SR)/Staff Engineer/삼성전자
246e982040 Fix build errors for TV build (#151)
- 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>
2018-09-18 15:56:31 +09:00
최현/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
ca52b9677e Fix SVACE issues (#66)
Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2018-04-25 08:13:02 +09:00
이승수/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
28de827199 Change default license to LGPL license (#60)
* Update build spec file
* Add License files

Signed-off-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
2018-03-07 18:38:28 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
e66f512b32 Implement ES6 Symbol.hasInstance, iterator, toStringTag, toPrimitive and built-ins (#46)
* Implement Array.from
* Disable part of ES6-shim due to wrong implementation

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-01-19 15:20:27 +09:00
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
13808ec66a Promise jobs should use it's saved Context value (#29)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-11-23 17:37:21 +09:00
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
1a1b06221f Enhance public Promise feature (#21)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-08-23 16:44:45 +09:00
seonghyun kim
0fe052715f 1. add ValueRef::toArrayIndex
2. remove virtualIdentifierInGlobalCallback
3. re-implement VirtualIDOperation for browser
4. add promise callback in vm
5. add parent pointer in ExecutionState
6. add locale, timezone parameter to VMInstance ctor

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-06-08 19:05:23 +09:00
seonghyun kim
dbc21192e3 implement Promise, gc, virtual property, virtual id things
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-25 13:15:38 +09:00
seonghyun kim
b5eb18a2dc implement more basic things in api layer
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-23 20:53:26 +09:00
seonghyun kim
a98bf4ec1b 1. add FUNCTION_OBJECT_BYTECODE_SIZE_MAX as config flag
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>
2017-04-14 13:20:08 +09:00
Saebom Kim
a7aa4ea929 1. Re-implement Date.prototype.toLocale* using icu library
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
2017-04-10 14:08:20 +09:00
seonghyun kim
7e2dc69a0d 1. enable build for android
2. add ENABLE_ICU flag

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-07 14:09:00 +09:00
seonghyun kim
811cc9553f 1. setting array.length to writable false while writing length is should correctly evaluated
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>
2017-03-28 14:23:48 +09:00
seonghyun kim
34dad07c79 move VM-bound data into VMInstance from context
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-23 18:48:02 +09:00
seonghyun kim
738dd930b0 1. trait invalid LHS assigment correctly
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>
2017-03-17 16:58:14 +09:00
Youngil Choi
e02af7daf8 Add License Clauses
Signed-off-by: Youngil Choi <duddlf.choi@samsung.com>
2017-03-10 18:06:20 +09:00
Junyoung Cho
880c068122 Recover m_contentLength in RopeString
- avoid performance loss in ChakraCore String test
(Strings/concat_empty.js)
2017-02-13 10:36:25 +09:00
Saebom Kim
d2aae57751 Fix some bugs and reduce memory usage from DateObject
* 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
2017-02-13 10:36:25 +09:00
seonghyun kim
0f1cc8999c 1. diet native getter, setter on Object
2. diet ByteCode
3. use get, setIndexedProperty in ByteCodeInterpreter
4. implement get, setIndexedProperty for typed array
5. move implemention of CallNativeFunctionOpcode to FunctionObject::call
6. remove m_contentLength, m_has8BitContent in RopeString
7. optimize ByteCodeInterpreter::getObjectPrecomputedCaseOperation, setObjectPrecomputedCaseOperation
8. diet Arguments object

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-13 10:36:25 +09:00
seonghyun kim
e305e378cb 1. add CodeBlock::m_hasArgumentsBindingInParameterOrChildFD for boost FunctionObject::call performance
- 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>
2017-02-13 10:36:25 +09:00
Saebom Kim
a4a468a9ce Refactor Date builtin & fix some bugs in it
* 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
2017-02-03 18:46:23 +09:00
seonghyun kim
a8754aac97 Merge Object::m_rareData with Object::m_prototype
Object::m_rareData share space with Object::m_prototype
- ObjectRareData inherits PointerValue

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-02 12:17:04 +09:00
seonghyun kim
2fc34d628a 1. use typed allocate for all long-live objects
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>
2017-01-20 15:51:47 +09:00
seonghyun kim
baeab5a6ac 1. optimze interpreter
2. optimze getThisBinding operation
3. optimze esprima::scanStringLiteral
4. optimze ObjectStructurePropertyDescriptor

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-11 12:39:06 +09:00
seonghyun kim
adc1b3cea1 1. optimze write, read global object in interpreter
2. optimze write, read object in interpreter

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-09 20:15:15 +09:00
seonghyun kim
9405b56d82 1. fix setting array length bug
2. optimze reduce array length
3. implement escape, unescape
4. implement rest of Array.prototype builtin functions

this patch pass all of test262(5.1)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-04 12:35:54 +00:00
seonghyun kim
98aaf50356 1. implement many part of Date object
2. implement SwitchStatement
3. fix Script parsing bug

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-16 21:04:49 +09:00
Junyoung Cho
f7a22f54fc Apply clang-formatting 2016-12-08 14:53:01 +09:00
seonghyun kim
485fbc25af initial commit
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-17 22:19:49 +09:00