Commit graph

72 commits

Author SHA1 Message Date
Seonghyun Kim
f5ae276846 Disallow -0 year on DateObject parsing
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-12-31 10:22:29 +09:00
Seonghyun Kim
18d3f010a0 Date.prototype.toTemporalInstant
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-11-20 14:25:16 +09:00
Seonghyun Kim
96beab3416 Implement basic methods of Temporal.Instant
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-09-04 13:22:13 +09:00
Seonghyun Kim
05553d2264 Impelement Intl.DateTimeFormat.prototype.formatRange
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-08-01 10:16:26 +09:00
Seonghyun Kim
f2b6d3d5e0 Try to parse date with ICU
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-07-10 18:53:34 +09:00
Seonghyun Kim
4a952115d0 Remove unnecessary strlen and memory copys
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-05-07 11:11:38 +09:00
Seonghyun Kim
ecf2a586b7 Optimize StringBuilder for huge String
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2025-05-07 11:11:38 +09:00
HyukWoo Park
5b935ec247 Re-implement Temporal and Temporal.PlainDate basics
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2025-01-08 10:26:05 +09:00
Seonghyun Kim
a2886b8db1 Update source and test driver for running test262 on windows
* Update test262 driver for python3 and windows
* Update DateFormat for windows
* Fix compiler warnings on Win64

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-07-07 09:20:04 +09:00
Seonghyun Kim
3aaded1210 Use ucal_* API instead of vzone_* API of ICU
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-06-19 11:37:25 +09:00
Seonghyun Kim
7a98a9ba52 Update timezone and locale codes
* Use ICU function for reading default system timezone
* Update default locale reading logic(remove POSIX postfix & ignore 'C' locale)
* Refactor global timezone, vzone, tzname codes

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-04-20 20:48:23 +09:00
Seonghyun Kim
dd010ab68e Divide Value::Value(double) into Value(DoubleToIntConvertibleTestNeedsTag, double) and Value(UnconvertibleDoubleToInt32 v)
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-04-06 16:41:23 +09:00
Seonghyun Kim
7414ebda02 Introduce new Value ctor for NaN, Infinity regard to fix arm clang issue
arm clang optimizer cannot generate correct code
with Value(std::numeric_limits<double>::quiet_NaN())
or Value(std::numeric_limits<double>::infinity())

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-04-04 14:12:32 +09:00
HyukWoo Park
f4aebb65ba Reduce Cyclomatic Complexity (CC) in Intl and Date
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2023-04-03 11:22:51 +09:00
HyukWoo Park
9f93022d78 Unlink circular dependency between runtime and parser source codes
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2023-03-28 16:17:00 +09:00
HyukWoo Park
581f020176 Fix code defects found by cppcheck
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-11-11 09:48:25 +09:00
Csizi Gergő Lajos
8e1ea20583 Fix some Temporal issues
Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-10-31 12:09:03 +09:00
Gergo Csizi
920be3b9d0 Add TemporalZonedDateTime object
Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-09-23 10:16:15 +09:00
Gergo Csizi
2e2b6a8398 Add getters for PlainDate, PlainDateTime and Calendar
Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-06-17 13:28:51 +09:00
Gergo Csizi
0980c57817 Add TemporalPlainDateTime, TemporalPlainDate objects
Basic implementation of TemporalPlainDateTime, TemporalPlainDate.

Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-05-27 14:57:22 +09:00
HyukWoo Park
8fa6031fec Add DerivedObject for sub classes of Object
* check index property set in DerivedObject::defineOwnProperty method only
* index property check is removed for normal Object because PrototypeObject would check it instead

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-11 15:59:43 +09:00
Gergo Csizi
1763b6f38d Add Temporal JavaScript feature
Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-05-06 19:58:51 +09:00
SeongHyun Kim
0af32fafde Implement build for Windows UWP
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-01-12 13:44:04 +09:00
SeongHyun Kim
110359e4db Update source & build files for windows
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
Signed-off-by: SeongHyun Kim <sh8281.kim@samsung.com>
2021-10-25 18:48:10 +09:00
Seonghyun Kim
77a68579a5 Implement per thread isolating
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-15 17:47:41 +09:00
HyukWoo Park
b605adbb1f Refactor GC allocation with bitmap info
* replace each Object's member marking with Object::fillGCDescriptor
* BigInt allocation is fixed to be handled by simple GC_MALLOC_ATOMIC call

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-05-18 15:34:07 +09:00
HyukWoo Park
29c70f7532 Update clang-format version to 6.0
* coding convention fixed following the new clang-format

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-12-18 11:13:15 +09:00
Seonghyun Kim
5fae029277 Remove unused variable & Fix memory leak from VMInstance::m_cachedUTC
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-11-23 13:53:29 +09:00
MuHong Byun
827d09454d Fix several bugs on
* Data object
* ByteCodeInterpreter

(From Seonghyun Kim <sh8281.kim@samsung.com>)

Signed-off-by: MuHong Byun <mh.byun@samsung.com>
2020-10-23 10:52:58 +09:00
HyukWoo Park
714d398364 Fix minor style defects found by cppcheck
* add const keyword for constant functions
* reduce the scope of variables if possible

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-10-08 14:40:48 +09:00
HyukWoo Park
f168e4bd7b Remove unused codes found by cppcheck
* remove unused functions
* remove unused variables
* mark necessary but unused variables with UNUSED_VARIABLE

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-10-06 13:11:07 +09:00
HyukWoo Park
93f225db2d Fix Date to represent year with padding zeros
* year value is represented as 4 fixed length with padding zeros

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-04-03 11:30:33 +09:00
HyukWoo Park
0f81aa5dce Represent all global error messages by static class members
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-04-03 11:30:10 +09:00
HyukWoo Park
5c8c4da50a Remove redundant prototype classes
* GlobalErrorObjectPrototype, DatePrototypeObject, RegExpObjectPrototype, SetPrototypeObject and WeakSetPrototypeObject are removed
* fix some intrinsic prototype object to be an Object instance
* rename prototype class names
* builtin methods of Date are simplified using macro

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-03-25 17:13:58 +09:00
HyukWoo Park
39a5922437 Fix [[Prototype]] initialization process for each object creation
* 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>
2020-03-24 18:26:25 +09:00
HyukWoo Park
ed616194d8 Implement OrdinaryCreateFromConstructor
* 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>
2020-03-16 16:52:44 +09:00
MuHong Byun
e2f1c3f47d Fix LGPL License verison typo (2.0 -> 2.1)
Signed-off-by: MuHong Byun <mh.byun@samsung.com>
2020-03-10 11:35:20 +09:00
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