Commit graph

1,187 commits

Author SHA1 Message Date
HyukWoo Park
cdb56523ba Update README
* add badge for license and action results
* set defualt license as lgpl-2.1

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-25 11:38:57 +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
HyukWoo Park
dbe6cd0e70 Handle exception cases in CodeCache
* handle ThrowStaticErrorOperation bytecode with default error message
* LoadRegexp bytecode could have empty string as its option string
* test on new-es benchmarks

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-24 14:04:52 +09:00
Seonghyun Kim
606b59ecef Suppress false positve asan stack underflow error
+ hide public symbols if possible

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-24 14:03:57 +09:00
HyukWoo Park
c226d3e888 Add actions to test code cache
* print code cache logs for test mode

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-20 15:02:32 +09:00
HyukWoo Park
383069820a Use hash value as its file name for code caching
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-19 16:54:32 +09:00
Seonghyun Kim
267238ae64 Fix Reloadable string bug
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-13 15:17:32 +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
a77b341324 Fix a typeof bug related with arguments object in arrow function
* for typeof operation within arrow function, arguments object should be accessed from the outer environments properly

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-07 16:40:55 +09:00
Seonghyun Kim
a4dd449e82 Add missed operators for OptionalRef
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-08-06 16:23:26 +09:00
HyukWoo Park
f56a557ff5 Reduce memory allocation during bytecode generation
* ByteCodeBlock does not hold location data info anymore
* location data of each bytecode is manually allocated only for stack-tracing or debugger mode
* duplicated String allocation for source code is removed

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-08-06 16:23:06 +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
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
3ec80377db Add new public APIs
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-30 15:15:18 +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
HyukWoo Park
436fac4423 Implement CodeCache for CodeBlock tree
* update read/write modules for CodeCache
* store and load CodeBlock tree

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-30 10:44:40 +09:00
Boram Bae
4faaa29331 Check return value of dlerror
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
2020-07-27 21:48:40 +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
25588dcb01 Implement NamedPropertyHandler API to ObjectTemplate
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-23 15:19:31 +09:00
HyukWoo Park
773007bec6 Each InterpretedCodeBlock has its children in a vector
* reduce the whole size of InterpretedCodeBlock instances
* iterate fastly on children

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-23 15:19:05 +09:00
Seonghyun Kim
906dbc6409 Add new api for Template
* Embedders can control (ESCARGOT_COMPRESSIBLE_COMPRESS_*) when compiling

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-17 11:30:04 +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
HyukWoo Park
586082c1d7 Fix NativeCodeBlock to directly store the native function point
* remove CallNativeFunctionData
* FunctionTemplate and native APIs allocate ExtendedNativeFunctionObject in itself

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-16 12:51:00 +09:00
Zoltan Herczeg
60ca7f1841 Release functions during parsing.
Fixes #702.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-07-10 09:35:02 +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
Seonghyun Kim
cb419ec930 ASTAllocator should use various size of buffer
* Idle memory usage is reduced from 128kb to 4kb

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
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
HyukWoo Park
cd09ccbb07 Rename ASTContext structure
* rename to ASTScopeContext and ASTBlockContext
* remove redundant ASTScopeContext parameter

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-07-06 10:07:56 +09:00
Seonghyun Kim
3e1c5f3889 Reduce MemberExpression size for performance
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-06 10:07:28 +09:00
Seonghyun Kim
149cac159a Implement OptionalExpression and OptionalChain
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-07-06 10:07:28 +09:00
bence gabor kis
1c7a1c3e06 Update proxy object to ES2020
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-07-02 10:23:02 +09:00
Bela Toth
b69706d0a4 Enable more Unicode characters as variable names
Fixes: #656

Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2020-07-01 15:10:39 +09:00
Seonghyun Kim
ca9b832a77 Introduce Object, FunctionTemplate
* Add cctest for Object, FunctionTemplates
* Fix one of EncodedValue <-> EncodedSmallValue conversion bug

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-29 12:38:39 +09:00
bence gabor kis
d3e5ec69ce New Feature - Nullish Coalescing (?? operator)
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-06-29 12:34:53 +09:00
Seonghyun Kim
1ab8994711 Update shell & test262 driver for running test262 tests correctly
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-25 18:39:09 +09:00
HyukWoo Park
6bf7a3f707 Fix type error in String::advanceStringIndex
* change the return type to uint64_t from size_t for 32bit environment

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-06-24 15:32:30 +09:00
HyukWoo Park
c7cd152802 Update the latest test262
* for development of ECMAScript 2020 standard
* test262 commit ef12a8b11c4dc1222097df4e7ea87a441d82262a
* use script to automatically update excludelist.orig.xml file
* tools/test/test262/make_excludelist.py --arch={x86|x86_64} --engine={ESCARGOT_PATH}

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-06-24 15:32:30 +09:00
bence gabor kis
77f9f59e41 New Feature - MatchAll and RegExpStringIterator
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-06-23 16:07:25 +09:00
Seonghyun Kim
056b18547b Update Promise builtin functions according to ES2020
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-17 18:33:07 +09:00
Seonghyun Kim
078fd4be4f Implement Promise.allSettled and refactor
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-17 18:33:07 +09:00
Seonghyun Kim
3d55b0bd3a Implement globalthis property
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-17 18:33:07 +09:00
bence gabor kis
d517104bed Update unicode table in third_party yarr
Related test262 test-cases has been removed (from skip list)

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-06-16 08:57:01 +09:00
Robert Fancsik
7bb5428cff Fix catch parse error when the debugger is enabled
Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2020-06-16 08:55:45 +09:00
Robert Fancsik
4dfaec7c4a Statement MetaNodes should be early constructed
Since the debugger breakpoint generation requires a continuously increasing series of LOC indices
the statement node infos should be constructed in the beginning of their parsing functions.

Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2020-06-11 18:12:46 +09:00
bence gabor kis
3bb4a39e50 able to send multiple source file to debugger server
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-06-11 17:54:21 +09:00
Seonghyun Kim
f82c81a5d2 In 64bit, we should use only 32bit for addressing
* Object, Array, Environment record internal space should use 32bit addressing on 64bit
* Rename SmallValue to EncodedValue.
* Implement EncodedSmallValue for using 32bit address on 64bit
* Implement special vectors for EncodedSmallValue.
  - we need these special vector. because when push_back or inserting the value what we want to insert
  can be removed by GC because the parameter type is 32bit(EncodedSmallValue).
* Update GCutil for 32bit addressing on 64bit

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-11 17:37:43 +09:00