Seonghyun Kim
12855be3f6
Implement accessing class private members in eval
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-05 13:08:59 +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
9c437bd8d7
Update rules related with constructor and prototype in class parsing
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-07-01 16:36:39 +09:00
Seonghyun Kim
4aeee459b3
Implement private class members initialize order
...
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
5a9b538077
class expression private name tests should refer parent class's private names
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-06-28 12:58:10 +09:00
Seonghyun Kim
1c5f4ab506
Implement private field optional chaining
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-06-28 12:58:10 +09:00
Seonghyun Kim
e7f21e36e4
Implement basic of private static field
...
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
Seonghyun Kim
ae6c6189c0
Refactor useless checking punctuator logic in parser
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-05-18 15:32:05 +09:00
Seonghyun Kim
a190dae51a
Implement basic parsing of class private field
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-05-17 14:32:54 +09:00
Seonghyun Kim
11c3bcc964
Implement hashbang grammar
...
https://github.com/tc39/proposal-hashbang
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-04-26 11:53:13 +09:00
Seonghyun Kim
0711d88306
Revise script parser
...
* Enable for await statement for Global Module code
* Disable html comment when parsing module code
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-04-16 09:58:15 +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
8a1100c18e
Update syntax error check for let array expression
...
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-04-07 19:26:47 +09:00
HyukWoo Park
f540c36edb
Add syntax error about declarations for if statement
...
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-04-07 12:06:39 +09:00
HyukWoo Park
b2b9fb6afd
Fix labelled typo
...
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-04-07 12:06:39 +09:00
HyukWoo Park
6610ae4825
Throw SyntaxError when function or class declaration is not located correctly
...
* throw error if function or class declaration is not located at the top level or inside a block
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-04-05 12:47:00 +09:00
Seonghyun Kim
40ebd4f837
await identifier is illegal expression on async function parameter
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-03-02 12:40:44 +09:00
Seonghyun Kim
161f516c54
Implement basic things of top level await
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-02-18 14:52:23 +09:00
Seonghyun Kim
b791bd9850
Disallow using arguments variable in class field when using eval function
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-02-02 10:21:45 +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
5f75330bab
Check computed name correctly in class static field
...
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
4f122f2900
Implement basic operation of static class field
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-01-05 15:17:14 +09:00
Seonghyun Kim
44909c6b22
Merge duplicate code as macro
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-12-21 12:13:03 +09:00
Seonghyun Kim
028566a1e7
Implement Logical OR assignmenet
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-12-21 12:13:03 +09:00
Seonghyun Kim
23a9a5d76d
Implement logical AND assignment
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-12-21 12:13:03 +09:00
Seonghyun Kim
3a6e3f0499
Implement Logical Nullish assignment
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-12-21 12:13:03 +09:00
HyukWoo Park
2720b9f4eb
Minor fix about lexical declared function
...
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-11-06 17:00:18 +09:00
HyukWoo Park
820e9f0c4d
Handle syntax errors for lexically declared functions
...
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-11-05 10:30:13 +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
44f20f0e56
When parsing string for BigInt, treat empty string as zero
...
* Optimize String.prototype.trim method
* Turn off slow tests in test262. these tests are failed on some machine due to timeout
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-21 14:18:50 +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
8821b0e275
Implement basic type operation of BigInt & basic builtin functions of BigInt
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-10-15 18:55:42 +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
2bce8e3d5e
Skip generating the bytecode of strict directive
...
* strict directive ('use strict') just marks the strict mode without any operation
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-09-08 11:01:10 +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
ccdf475f9b
Implement new config for smaller device
...
* In small config, we turn off SyntaxChecker for small binary size
* CompressibleString should get VMInstance instead of Context
* If ICU is disabled, we don't need unicode information in yarr
* Remove unused variable in yarr(RegExpJitTables)
* Fix lz4 compile error
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-06 14:07:11 +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
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
Seonghyun Kim
3f1001454e
In parser, invalid assignment error is changed from ReferenceError to SyntaxError
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-16 12:51:24 +09:00
Seonghyun Kim
fd969d6da2
Each formal parameter should not have separate Environment Record(the spec is changed)
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-09 11:11:18 +09:00
Seonghyun Kim
3c642c8932
Apply new spec rules of escaped, reserved keyword
...
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-09 11:11:18 +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