Commit graph

611 commits

Author SHA1 Message Date
Hyukwoo Park
d60fc706fd Clean up cmake build (#98)
* remove deprecated build options
* remove unnecessary quote symbols to improve readability

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-02-21 16:47:33 +09:00
Hyukwoo Park
92dff6a80c Update the rest of TypedArray builtin functions Part 2. (#104)
* forEach, join, reduce, reduceRight, reverse methods of TypedArray updated

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-02-21 13:29:18 +09:00
Roland Takacs
78eb42b5ae Use c++11 standard library instead of c++0x (#95)
Signed-off-by: Roland Takacs <rtakacs.uszeged@partner.samsung.com>
2019-02-21 13:28:56 +09:00
Hyukwoo Park
1328c113e5 Update the rest of TypedArray builtin functions Part 1. (#101)
* Array.prototype.fill method updated
* fill, find, findIndex methods of TypedArray updated
* TypedArray.prototype.every method is optimized to get a indexed property value more efficiently

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-02-20 16:21:21 +09:00
Zoltan Herczeg
69555d516a Remove HAS_OBJECT_TAG check. (#103)
It is enough to know whether a value is SMI or not.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-02-20 16:14:52 +09:00
Daniel Balla
26ee1718c5 Add RegExp.compile() function (#100)
This patch adds RegExp.compile() function.
Since the given argument can be a RegExp object as well, which already has their option flags parsed there was a need to add a new init function which doesn't parse flags and accepts an `unsigned int` as its parameter.

Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
2019-02-20 16:14:31 +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
Peter Marki
250d95d381 Fix bytecode generation for var statements in for-in statements (#52)
Fixes #29

Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-02-19 15:48:14 +09:00
Tóth Béla
5572e2b7de Reduce the rest of the member visibility code smell (#99)
Contains the fix for the rest of the member visibility reports from Sonarcloud.

https://sonarcloud.io/organizations/pando-project/issues?open=AWfKGekKAVFeC0PaKxib&resolved=false&rules=cpp%3AS3656

Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2019-02-18 12:24:57 +09:00
Zoltan Herczeg
ed21c68ba6 Primitive types should use the same representation for Value and SmallValue (#92)
* Primitive types should use the same representation for Value and Small Value.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com

* An attempt to x86-32 (Will be merged if works).

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-02-15 13:51:34 +09:00
Tóth Béla
dab095397d Extract assignment from sub-expressions (#97)
Sonarcloud reported an issue, namely `Assignments should not be made
from within sub-expressions. This affected only the Lexer, and were fixed.

https://sonarcloud.io/project/issues?id=pando-project_escargot&resolved=false&rules=cpp%3AAssignmentInSubExpression&sinceLeakPeriod=true&types=CODE_SMELL

Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2019-02-15 13:46:20 +09:00
Roland Takacs
d4979e1718 Eliminate the memory copier code duplications in the Vector classes. (#96)
Introduced a new template VectorCopier class that has specializations
for the `memcpy` and the `copy constructor` cases.

Signed-off-by: Roland Takacs <rtakacs.uszeged@partner.samsung.com>
2019-02-15 13:46:10 +09:00
Hyukwoo Park
ac5c7790b8 Enable Proxy and Reflect with internal TC (#88)
* enable proxy and reflect features in default
* add internal TC
* vendortest is updated to avoid stack overflow error in v8 TC

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-02-14 11:28:08 +09:00
Tóth Béla
80576ba08c Reduce code smell around member access - Runtime (part1) (#90)
First part of the code smell reducing in src/runtime.

https://sonarcloud.io/organizations/pando-project/issues?open=AWfKGekKAVFeC0PaKxib&resolved=false&rules=cpp%3AS3656

Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2019-02-14 09:07:35 +09:00
Tóth Béla
5815a11ff3 Reduce code smell around member access - AST (part2) (#89)
Second part of the code smell reducing in AST.

https://sonarcloud.io/organizations/pando-project/issues?open=AWfKGekKAVFeC0PaKxib&resolved=false&rules=cpp%3AS3656

Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2019-02-14 09:07:10 +09:00
kisbg
145ee3da98 Change check-tidy.py default clang format (#86)
When installing clang-format with sudo , its not installing automatically Clang-format-3.8,
but Clang-format-3.9 is installed instead.
Also the code formatting in src/runtime/GlobalObjectBuiltinRegExp.cpp update to Clang-format-3.9.

Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
2019-02-14 09:05:04 +09:00
kisbg
21cd2bd2d6 Reduce code smell - explicit (#83)
"explicit" should be used on single-parameter constructors and conversion operators

https://sonarcloud.io/organizations/pando-project/issues?resolved=false&rules=cpp%3AS1709

Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
2019-02-13 08:21:40 +09:00
Zoltan Herczeg
29ac4731c9 Move white space and new line checkers into the Lexer. (#81)
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-02-13 08:19:28 +09:00
Tóth Béla
110e9c2e94 Reduce code smell around member access - AST (part1) (#85)
First part of the code smell reducing in AST. The directory contains
many more files, so i thought it'd be a good idea to seperate them into smaller
chunks to make code review easier.

https://sonarcloud.io/organizations/pando-project/issues?open=AWfKGekKAVFeC0PaKxib&resolved=false&rules=cpp%3AS3656

Signed-off-by: Bela Toth [tbela@inf.u-szeged.hu](mailto:tbela@inf.u-szeged.hu)
2019-02-12 10:16:24 +09:00
Tóth Béla
8f710b804e Reduce code smell around member access (#84)
This first part is smaller, due to following reports almost all beeing in a distinct subdirectory
of these, so i wanted to avoid mixing those in. This seems a proper logical dividing point for me.
https://sonarcloud.io/organizations/pando-project/issues?open=AWfKGekKAVFeC0PaKxib&resolved=false&rules=cpp%3AS3656

Signed-off-by: Bela Toth <tbela@inf.u-szeged.hu>
2019-02-12 10:16:05 +09:00
Zoltan Herczeg
f09fba8cce Remove OctalToDecimalResult from Lexer. (#80)
Instead use a special value to represent invalid octal values.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-02-12 10:12:03 +09:00
kisbg
54fea51393 Replace this "throw()" clause by "noexcept" in CustomAllocator.h (#79)
https://sonarcloud.io/organizations/pando-project/issues?resolved=false&rules=cpp%3AExceptionSpecificationUsage

Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
2019-02-12 10:11:37 +09:00
Hyukwoo Park
dbccca6f3a Update Reflect object and internal methods [es2015] (#78)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-02-11 15:49:16 +09:00
Hyukwoo Park
fa96ce1f18 Fix travis error when merged into the master branch (#73)
* allow longer running time for test262 and chakracore
* move darwin test to allow_failure

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-02-01 15:26:08 +09:00
Zoltan Herczeg
dc30cd3035 Move ScannerResult into Scanner. (#77)
This way several functions can be moved into the private section.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-31 18:16:26 +09:00
Hyukwoo Park
871829c0fa Fix setPrototypeOf method of Object and Proxy (#76)
* fix setPrototypeOf internal method according to the es2015 spec

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-31 18:16:17 +09:00
Peter Marki
90ba62d6aa Check for assignment to self in operator=() functions (#72)
Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-01-31 13:31:14 +09:00
Zoltan Herczeg
5d5162ccca Remove tolerant parsing. (#75)
A JS engine must not accept an invalid JS code so tolerant
parsing is removed from the parser and configuration.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-30 14:47:57 +09:00
Zoltan Herczeg
a82b41313b Introduce private section for Lexer. (#74)
Start hiding private helper functions from outside world. Next step
will be hiding private data members.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-30 14:47:42 +09:00
Hyukwoo Park
f943931488 Update Revoke and Revocable method of Proxy (#69)
* Implement Proxy.revocable inner method
* Implement revocation builtin function object

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-30 14:47:28 +09:00
Hyukwoo Park
28e0345d42 Update TC list to make travis run fast (#70)
* merge each -DVENDORTEST build test onto one release build test
* exclude jetstream-only-simple and octane test from darwin due to excessively long running time

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-28 14:19:46 +09:00
kisbg
2034046a00 Updating the prerequisites (#68)
Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
2019-01-28 14:18:56 +09:00
Robert Sipka
6d0d69a0cb Do not call generateStatementByteCode for RegExpLiteral node in for statement (#65)
Fixes #35

Signed-off-by: Robert Sipka <rsipka.uszeged@partner.samsung.com>
2019-01-24 14:21:27 +09:00
Zoltan Herczeg
56868385e1 Remove CharOrEmptyResult structure. (#63)
Introduce EmptyCodePoint constant to represent the empty case.
Also hex conversion is simplified.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-24 14:20:36 +09:00
Hyukwoo Park
3dec40df2e Support Method Property in Object Initialization [ES2015] (#67)
* Support for method notation in object property definitions

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-23 14:06:37 +09:00
Akos Kiss
d7aa053de0 Allow octane tests to run longer in macOS CI jobs (#66)
Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
2019-01-23 14:06:12 +09:00
Hyukwoo Park
9a9b376229 Update Call and Construct method of Proxy (#64)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-23 14:05:30 +09:00
Robert Sipka
78095de75a Fix the function declarations in catch statement (#61)
Use dynamic allocation for IdentifierNode to prevent early destructor call.

Fixes #27

Signed-off-by: Robert Sipka <rsipka.uszeged@partner.samsung.com>
2019-01-23 14:04:20 +09:00
Peter Marki
16010c33e1 Throw exceptions by value and catch by reference (#62)
Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-01-23 11:50:52 +09:00
Zoltan Herczeg
de84be2e9e Remove curlyStack structure. (#59)
Instead of maintaining a structure in memory simply re-scan the
right brace when a template is parsed.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-22 18:15:17 +09:00
Daniel Balla
c21afcb74b Fix wrong behaviours in Promise.race() and Promise.All() functions (#57)
The assertions were wrong, if the given `iterable` was not an `Object` or not an `ArrayObject` the promise should have been just rejected.
Fixes #25
Fixes #30

Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-01-22 14:07:59 +09:00
Robert Sipka
0ece5de077 Add missing regression test for issue-26 (#58)
Signed-off-by: Robert Sipka <rsipka.uszeged@partner.samsung.com>
2019-01-22 10:35:58 +09:00
Zoltan Herczeg
57b75326d4 Rework isIdentifierPartSlow. (#56)
The new code uses a binary search instead of a very large if statement.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-21 12:24:38 +09:00
Robert Sipka
93c2de5435 Evaluate function declarations in catch statements properly (#54)
Fixes #26

Signed-off-by: Robert Sipka <rsipka.uszeged@partner.samsung.com>
2019-01-21 12:23:10 +09:00
Hyukwoo Park
40d4fa40c6 Implement Proxy object internal methods (#39)
* updated proxy methods
GetPrototypeOf
SetPrototypeOf
IsExtensible
PreventExtensions
GetOwnProperty
DefineOwnProperty
HasProperty
Get
Set
Delete
ProxyCreate

* TODO
Enumerate and OwnPropertyKeys
Call and Construct

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-21 12:22:40 +09:00
Daniel Balla
7d320870d7 Add regression tests (#41)
Now regression tests for resolved issues can be added to the project.
Regression tests are enabled by default.
They can be manually run by appending `regression-tests` to the `run-tests.py` command.
There is an `expected-failures` directory for tests that should fail.
The .gitignore file was modified as well to making sure it doesn't ignore these testfiles.

Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-01-21 10:23:07 +09:00
Zoltan Herczeg
09b45e47b4 Move Lexer (Scanner) out of parser. (#55)
Currently the parser is a very large file and hard to maintain. This patch is
the first which splits it into smaller files.

During the move some style fixes are applied. The identifer start
detection is improved as well.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-01-17 15:36:14 +09:00
Daniel Balla
b7f9750f96 Fix an issue with Object Property Descriptors (#53)
Pass an undefined value as Property Descriptor's `value` property if the previous descriptor's value was not present.

Co-authored-by: Robert Fancsik <frobert@inf.u-szeged.hu>
Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-01-17 15:36:05 +09:00
Hyukwoo Park
2535885050 Update missing builtin functions of String (#50)
* Implement repeat and normalize
* normalize function exploits unicode normalization forms

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-01-14 13:57:29 +09:00
Peter Marki
9a313f36bf Handle exceptions thrown by toString() when trying to convert an uncaught error (#42)
Fixes #36

Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-01-10 17:38:57 +09:00