Commit graph

323 commits

Author SHA1 Message Date
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
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
Seonghyun Kim
4de5ea05bf Implement basic of class private static method
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-06-23 15:55:18 +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
a16fcc9412 Update es-actions to test various build options within x64 environment
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-05-26 09:36:47 +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
4cd0da1e07 Implement await dynamic import resolution
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-04-15 10:58:10 +09:00
HyukWoo Park
c4073deee7 Fix self-reference in class static field initialization
* handle class constructor as a virtual parameter which is passed for static field initialization function

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-04-13 15:32:36 +09:00
HyukWoo Park
27ed2989e1 Handle cases when binding object of with statement has @@unscopables property
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-04-07 19:26:47 +09:00
HyukWoo Park
07d30825a0 Update BigInt exception handler
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-25 10:05:45 +09:00
Seonghyun Kim
495437c814 Avoid use of c++ exception when implementing ExeuctuionPauser
* Optimize StringBuilder

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-03-24 10:30:35 +09:00
HyukWoo Park
8f4b125b22 Revise Jump bytecode and JumpFlowRecord for CodeCache
* remove JumpByteCode and add JumpFlowRecord which has no pointer value
* simplify JumpFlowRecord data caching
* fix coverity issue
* add log message for code cache

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-18 10:24:44 +09:00
HyukWoo Park
2b775dc2f5 Revise BigInt not to hold VMInstance pointer
* bf_context_t is now defined as a global variable and maintained during the runtime
* VMInstance::finalize is invoked at the end of program to guarantee the life time of bf_context_t

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-03-10 12:29:55 +09:00
Bence Gabor Kis
01541b923f Update TypeArray Detachbuffer
related test262 test-cases has been removed from the skip list

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2021-03-08 16:13:44 +09:00
HyukWoo Park
4d307d221f Add missing api
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-02-17 10:17:56 +09:00
Seonghyun Kim
109d199302 Reimplement static field initializer
* wrap initializer expr into virtual arrow function like instance field
* users can access super property in eval

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-02-02 10:21:45 +09:00
Seonghyun Kim
d088f0416e class should define name before define prototype
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-28 14:37:35 +09:00
Seonghyun Kim
7047a7e0f7 class should evalutate field names first
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-28 14:37:35 +09:00
Seonghyun Kim
2dee70d5ff Implement super expression for class field
* Add toPropertyKey call for property key name

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-26 10:14:22 +09:00
Seonghyun Kim
dac08ab369 Implement runtime things of class field
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-21 18:22:20 +09:00
Seonghyun Kim
20f3478f3d Implement parsing class field and add field init function
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-21 18:22:20 +09:00
Seonghyun Kim
5016b7af3b Implement fast-path of super expression in static field initializer
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-15 11:39:57 +09:00
Seonghyun Kim
f0c64aa74a Implement super keyword in class static field init
* Implement Open, Close env Bytecode for this

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-13 17:06:44 +09:00
Seonghyun Kim
19823a483b Add this support for eval in class static field init
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-05 15:17:14 +09:00
Seonghyun Kim
58af1ce82c Implement class static field this value of arrow function in field init
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-05 15:17:14 +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
033fb60f2a Use external storage instead of ByteCodeCodeData for generator, async function
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-11-17 14:31:17 +09:00
Seonghyun Kim
b7638a3b51 Implement bigint shift operations
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-11-11 18:51:53 +09:00
Seonghyun Kim
840278945d Implement bitwise operations for BigInt
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-11-11 18:51:53 +09:00
HyukWoo Park
3ebb4ea634 Remove redundant header files
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-11-06 17:00:18 +09:00
HyukWoo Park
dae791b479 Update Jump bytecode operation
* fix JumpIfEqual bytecode correctly
* rename Jump* bytecode to represent its operation more intuitively

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-11-04 09:48:09 +09:00
HyukWoo Park
e0bd962e6e Add IsHTMLDDA feature
* https://www.ecma-international.org/ecma-262/#sec-IsHTMLDDA-internal-slot
* IsHTMLDDA internal slot is an ECMAScript feature for Web Browsers
* IsHTMLDDA is currently enabled only for test mode (we can enable it later if it is really used by third party app)
* some related operations are optionally fixed

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-10-30 14:53:23 +09:00
Seonghyun Kim
6df488caaf Update many binary expressions for BigInt
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-27 11:00:49 +09:00
HyukWoo Park
897a1d2ae5 Fix some minor defects and build errors
* fix defects checked by static analysis
* fix Jenkins and actions build script

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-10-23 11:28:08 +09:00
Seonghyun Kim
8765374818 Implement operations related with BigInt
* Apply new rules on ++, --, - operation
* Implement parsing hex BigInt literal
* Implement BigInt.asUintN, asIntN

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-23 11:26:31 +09:00
Seonghyun Kim
159e670775 Update plus, abstract relational comparions for BigInt
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-23 11:26:31 +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
Seonghyun Kim
9f8b6fdb04 Don't use UnaryMinus ByteCode if possible
* If the parser gets -1, the parser divide -1 into UnaryMinus and LiteralNode.
* This patch remove UnaryMinus and change Literal value negative

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-16 12:55:41 +09:00
Seonghyun Kim
8cbb7f2251 Update equal operation, unary minus for BigInt
* Implement BigIntData for fast execution

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-16 12:55:41 +09:00
Seonghyun Kim
9c9457ea38 Implement BigInt infrastructure
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-14 16:18:53 +09:00
HyukWoo Park
a96f39f0e6 Unify regular expression notation as RegExp
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-24 14:04:52 +09:00
Seonghyun Kim
4e9349b999 Implement ReloadableString
* turn off ALWAYS_INLINE in small config
* turn off hidden class transition table in small config

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-13 14:07:37 +09:00
HyukWoo Park
11e469c6fa Implement CodeCache for bytecode
* store/load global ByteCodeBlock

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-03 10:40:17 +09:00
Seonghyun Kim
ba4763e888 Implement runtime part of dynamic-import
* Implement one of parsing error of module
* Fix one of stack usage error on FunctionObjectInlines

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-30 11:56:17 +09:00
Seonghyun Kim
5dc636380c Implement parsing dynamic import expression
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-30 11:56:17 +09:00
Ryan Hyun Choi
99b2d0f8ce Check values of getenv() for validity
Signed-off-by: Ryan Choi <ryan.h.choi@gmail.com>
2020-07-27 15:51:18 +09:00
Seonghyun Kim
6503fc0416 Implement import.meta spec(MetaProperty)
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-16 12:51:24 +09:00
HyukWoo Park
747803bf81 Add InterpretedCodeBlockWithRareData
* extract infrequently used m_rareData member from InterpretedCodeBlock
* InterpretedCodeBlockWithRareData handles InterpretedCodeBlockRareData inside itself

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-08 16:56:44 +09:00
HyukWoo Park
2fe9333814 Divide CodeBlock into NativeCodeBlock and InterpretedCodeBlock
* NativeCodeBlock is newly added for NativeFunctionObject
* all interpreter-related info is moved into InterpretedCodeBlock

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-08 16:56:44 +09:00