Commit graph

35 commits

Author SHA1 Message Date
Seonghyun Kim
af9b410fa7 Fix issues in some embedded platforms
* Implement RuntimeICUBinder
 - ICU has verison name on its symbol name like u_tolower_XX.
   but, we need to use escargot on various platform(without re-compile)
   thus, I implement this library
* add ceil function on IEEE754
 - there is an issue with -0 in builtin ceil function
* Use pypy instead of python for running test262(pypy is faster than python)

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-01-09 16:07:51 +09:00
seonghyun kim
53906a6d81 Optimize runtime performance
* 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>
2019-12-05 15:04:20 +09:00
Boram Bae
80c09d05eb Implement ECMA-402 related functions (#422)
* Fix some bugs related to Intl
* Use default timezone from VM instance
* The following functions should use Intl when the js engine supports Intl.
  Number.prototype.toLocaleString ([ locales [ , options ]])
  Date.prototype.toLocaleString ([ locales [ , options ]])
  Date.prototype.toLocaleDateString ([ locales [ , options ]])
  Date.prototype.toLocaleTimeString ([ locales [ , options ]])
* This patch fixes #251

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
2019-09-10 18:29:47 +09:00
Patrick Kim
881a44e0fb Fixup generator (#393)
* We can use try-catch with yield together now.
* Implement return, throw function in GeneratorObject correctly
* yield expression parsing in esprima 3.1.1 is wrong. so I get right version of yield parsing from newer version of esprima

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-08-28 13:57:32 +09:00
Boram Bae
27695e20dd Fix bugs related to Date (#389)
* Pass more tests
* Replace the wrong test262 tests with internal tests.
* Use test result file at tools dir in chakracore test in run-test.py

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
2019-08-27 13:24:43 +09:00
Hyukwoo Park
fb0934f73b Update initialization of DateObject (#262)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-05-17 18:37:08 +09:00
kisbg
02f462a481 Reduce code smell -Remove setPrototype method in constructor/destructor. (#109)
https://sonarcloud.io/project/issues?id=pando-project_escargot&resolved=false&rules=cpp%3AS1699&severities=CRITICAL&sinceLeakPeriod=true&types=CODE_SMELL

Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
2019-03-04 20:25:32 +09:00
Daniella Barsony
56b7748c67 Reduce code smells (#82)
Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-02-19 15:48:48 +09:00
박혁우/Tizen Platform Lab(SR)/Staff Engineer/삼성전자
e8ef8741fe Update CMake for using add_subdirectory feature (#156)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2018-10-30 18:12:55 +09:00
Youngil Choi
17edf609e4 Resolve coding rule volations
Signed-off-by: Youngil Choi <duddlf.choi@samsung.com>
2018-09-28 17:01:03 +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)/Staff Engineer/삼성전자
f83bde0cd1 Update macro usages to be compatible with newer compilers (#118)
Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2018-07-12 13:29:45 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
c34461310f make test262(ES5) runnable on Windows (#78)
* add icu as submodule
* Fix some wrong implemations
* Remove functions defined on ctypes.h. its implemations slightly different on POSIX and Windows.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-14 15:19:55 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
e94a02a0cf Add build artifacts for MSVC 15.0 & Make compilable in MSVC (#76)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-10 17:37:26 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
cf1584715e Date.prototype.toUTCString should not throw exception (#62)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-03-12 17:21:43 +09:00
이승수/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
61c351c935 Add samsung copyright for several files (#56)
Signed-off-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
2018-02-22 19:24:11 +09:00
이승수/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
5fb97a9eb8 Modify license notice for each file (#55)
Signed-off-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
2018-02-22 18:23:17 +09:00
김원용/Web Platform Lab(S/W센터)/Engineer/삼성전자
8ed0d55bca Fix setTimeValue bug at DateObject (#15)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-08-10 08:37:33 +09:00
Saebom Kim
74869c1ec9 1. remove RELEASE_ASSERT_NOT_REACHED in ScriptParser
2. fix a floating point precision bug in DateObject
3. fix a bug in Math.round() which occured with big integer

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-05-12 20:18:22 +09:00
Saebom Kim
e21444c38a Fix some bugs detected from chakracore TC & Add essential test environments
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-05-11 13:03:57 +09:00
seonghyun kim
aa0b23d765 1. update android build flags
2. fix typeof bugs

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-11 13:12:31 +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
2d4b740d39 1. give correct error to unsupported ES6 syntax
2. parse trailing whitespace correctly in Date parsing

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-05 12:48:23 +09:00
Saebom Kim
ab00bdfdd2 1. Object derived from primitive value can't define its new property
2. Fix bug with floating point precision in Date.parse
3. Fix bug in Date.setYear()/setFullyear() occured with invalid date value

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-30 20:51:56 +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
Youngil Choi
38dbe94d8d 1. use snprintf for string
2. use ESCARGOT_LOG_INFO, ESCARGOT_LOG_ERROR
2017-02-22 19:28:26 +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
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
dbbbdf2374 allocate almost gc objects as typed gc object
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-18 20:28:45 +09:00
seonghyun kim
824e750e8a 1. argument order of FunctionObject::call is fixed
2. connect ExectionContext in GlobalObject::eval
3. remove ByteCodeBlock if needed

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-10 15:56:23 +09:00
Eunji Jeong
ff5be05310 Implement and refactor Date builtin 2017-01-03 20:16:45 +09: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
seonghyun kim
52dc57eca5 add missing Date files
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-12 11:35:47 +09:00