Commit graph

212 commits

Author SHA1 Message Date
HyukWoo Park
26af0cddc6 [return-check] change exception handling to return-check based method in interpreting (runtime) process
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2023-08-18 18:36:46 +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
67216fcac9 Replace gc-allocated std::{unordered_map,unordered_set} with robin-{map,set}
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-07-07 09:20:04 +09:00
HyukWoo Park
e275ba66f5 Remove an unused variable in ALLOCA
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2023-05-31 12:49:24 +09:00
Seonghyun Kim
3894bfec5d Enable more v8 tests
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2023-05-30 11:47:58 +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
Seonghyun Kim
693dcf114c Implement PrivateIdentifier in ... expression
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-09-16 14:39:58 +09:00
HyukWoo Park
d2a17f09cd Update finalizer with shrink function
* add shrink function to resize finalizer list
* shrink the list when about an half of the list is empty

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-08-03 16:40:35 +09:00
HyukWoo Park
bf1ff52089 Fix finalizer to prevent any possible memory defect
* replace erase operation of vector with non-memory operations
* erase operation requires additional memory allocations which may incur other GC in sequence
* fix GCutil to make gc finalizer not to be invoked in nested calls
2022-08-01 13:28:00 +09:00
HyukWoo Park
488de00180 Directly insert properties for builtin objects
* replace defineOwnProperty with directDefineOwnProperty method
* directly insert new properties for builtin objects

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-23 16:02:33 +09:00
HyukWoo Park
786cb68d27 Fix the type of prototype in Temporal
* prototype object of Temporal should be ordinary object
* fix the type of prototype as to PrototypeObject

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-11 15:59:43 +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
Seonghyun Kim
04eb482d1e Add Object::constructorName API
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 19:05:38 +09:00
Seonghyun Kim
4ed055e82c Add special method for add property in object what was not existent.
the new method not check the existent of proeprty.
it can used for builtin-functions

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 18:47:43 +09:00
Seonghyun Kim
64403a2ea2 Implement get fast source, flags proeprty for RegExpObject
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 18:47:43 +09:00
HyukWoo Park
0f034c7f0b Mark non-fast mode ArrayObject by existing fast-mode data
* set dummy element address to denote non-fast mode array
* represent non-fast mode array without creating ObjectRareData

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-25 10:47:32 +09:00
HyukWoo Park
d231bc0800 Rename tagging operations
* rename tagging operations to clearly recognize typeTag and tag (vtable address)
* add global tag values for ScriptSimpleFunctionObject

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-22 16:11:56 +09:00
Seonghyun Kim
292ead9d73 Implement checking update ArrayObject while enumerate
We can find disappered index without using the flag

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-18 17:15:36 +09:00
Seonghyun Kim
ba7c596e59 Implement PrototypeObject
PrototypeObject always returns true in Object::isEverSetAsPrototypeObject.
thus it don't need another space for mark it was used for prototype object.
this object can reduce a lots allocation of ObjectRaraData

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-18 17:15:36 +09:00
Seonghyun Kim
5d984c935c Implement fast path of get symbol from object.
the path is used on Value::instanceOf and Value::toPrimitiveSlowCase

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-03-16 14:46:17 +09:00
Seonghyun Kim
a484082e44 Reduce memory usage
* remove useless GC_MALLOC_EXPLICITLY_TYPED
  typed-malloc information is allocated with each malloc operation

* Implement fast path for ObjectPropertyName

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-03-14 14:32:57 +09:00
Boram Bae
ada969cc24 Improve object enumeration performance
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
2022-03-11 13:59:14 +09:00
HyukWoo Park
47530e7ebb Optimize Object::getPrototypeFromConstructor for function case
* quickly get `prototype` property of function object

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-03-07 13:34:21 +09:00
Boram Bae
3d83a5fd47 Use original desc if this and receiver are same
* This way you can reduce the getOwnProperty calls.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
2022-03-03 18:16:30 +09:00
Seonghyun Kim
b1b505ae42 disable gc while calling Object finalizer 2022-01-05 13:36:36 +09:00
HyukWoo Park
fa052c8902 Refactoring ObjectTemplate's PropertyHandler
* update to common PropertyHandler data and strucuture to represent IndexedProperty and NamedProperty both
* check property name in each ObjectWithPropertyHandler method

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-17 17:22:35 +09:00
HyukWoo Park
f47def1f22 Replace TemplatePropertyName with existing ObjectStructurePropertyName
* usually property name is delivered as Value format
* replace `TemplatePropertyName` with `ObjectStructurePropertyName` to handle Value format nicely

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-11-10 14:51:47 +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
HyukWoo Park
81bae461df Handle BigInt type in CreateListFromArrayLike method
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-09-03 12:55:47 +09:00
HyukWoo Park
0d65ad5e3d Implement lazy builtin initialization
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-08-12 13:43:23 +09:00
Seonghyun Kim
7b77fcd4cd If object has native data accessor with actsLikeJS is true, the object should be non inline cacheable
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-08-11 15:28:35 +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
0b0ddee8e1 Refactoring index property handling
* when trying to use index property, we use only 32bit for index value (uint32_t)
* rename ArrayIndex as to Index32 and IndexProperty
* add cctest to verify the new api

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-07-05 13:20:38 +09:00
Seonghyun Kim
8c3cd2f3b1 Implement chain of ClassPrivateMemberData
* Each chain piece represents one of class
* User can uses private member with same name parent with child class
* We should check nearest [[homeObject]] of function to find where function is located

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-01 16:36:39 +09:00
Seonghyun Kim
1fbaf749bf Implement ObjectPrivateMemberStructre for reducing memory usage
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-01 16:36:39 +09:00
Seonghyun Kim
050812963e Implement one of nesting class private rule
- We need to check object value is homeobject if there is same private name on parent class

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-01 16:36:39 +09:00
HyukWoo Park
70ecdf0214 Fix minor code defects
* fix to static functions
* fix to const functions
* remove unused variables

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-06-30 13:55:52 +09:00
HyukWoo Park
dd9e38f2bd Unify getter/setter methods for 32bit and 64bit platforms
* run additional test262 for 32bit-release environment

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-06-29 17:16:17 +09:00
Seonghyun Kim
25679c9980 Fix negative ValueRef integer bug with ESCARGOT_USE_32BIT_IN_64BIT flag
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-06-17 11:03:40 +09:00
Seonghyun Kim
7b0a24f1a7 Implement basic of class private field and method
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-06-08 13:00:26 +09:00
HyukWoo Park
616f32bb79 Remove ESCARGOT_OBJECT_SUBCLASS_MUST_REDEFINE macro
* override keyword specified instead

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-06-03 10:52:31 +09:00
HyukWoo Park
75d5a1dfb7 Add conversion from ObjectGetResult to ObjectPropertyDescriptor
* update ObjectGetResult::convertToPropertyDescriptor
* directly convert ObjectGetResult to ObjectPropertyDescriptor instead of creating a new Object for descriptor

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-06-02 10:33:16 +09:00
Seonghyun Kim
8e71c6e208 Pass receiver to Object::get, Object::{get, set}IndexedProperty operation
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-05-11 11:51:17 +09:00
Seonghyun Kim
5192d33431 Object Data Accessor property can be act like JavaScript getter setter
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-05-03 19:02:49 +09:00
HyukWoo Park
e47add9264 Remove ambiguous NULLABLE macro
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-04 15:53:45 +09:00
Seonghyun Kim
64e24255cb Fix memory bugs
* Init YarrPattern::m_body variable
* Remove Objects finalizer in finalizer of WeakMap,Set
* Use correct finalizer for Intl Objects

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-03-04 09:35:30 +09:00
Seonghyun Kim
390261326e Store m_target of WeakRefObject as weak reference
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-02-03 12:18:02 +09:00
HyukWoo Park
b30518c41f Update TestIntegrityLevel operation
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-12-23 11:39:06 +09:00
HyukWoo Park
a8e7b7d47d Update SetIntegrityLevel operation
* update freeze and seal builtin methods of Object too

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-12-23 11:39:06 +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