Commit graph

169 commits

Author SHA1 Message Date
Robert Fancsik
9166b2de38 Implement the generator functions (#270)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-10 11:55:14 +09:00
Hyukwoo Park
8853bb4403 Merge IteratorStep and IteratorValue bytecodes (#279)
* IteratorValue can be replaced with IteratorStep
* it's better to keep the number of bytecode as small as possible

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-06-04 13:45:01 +09:00
Roland Takacs
c3039c8b37 Simplify the OpcodeTable initialization. (#267)
Pass null pointers for ByteCodeInterpreter::interpret to indicate
the OpcodeTable initialization. In this case the FillOpcodeTable
opcode can be removed.

Signed-off-by: Roland Takacs <rtakacs.uszeged@partner.samsung.com>
2019-05-23 14:46:24 +09:00
Csaba Repasi
c426b1d688 Eliminate REGISTER_LIMIT based code duplications. (#268)
Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2019-05-22 11:22:21 +09:00
Robert Fancsik
2e588a542b Implement patterns (#222)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-15 21:29:55 +09:00
Peter Marki
4e1d74c2df Eliminate segfault when array changes to non-fast mode (#252)
Fixes #132

Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-05-14 17:42:29 +09:00
Robert Fancsik
1fc56fcf9a Implement the class language element part II. (#203)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-14 09:10:13 +09:00
Robert Fancsik
837af8405f Optimize branch instructions and loop increment/decrement operations (#241)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-13 12:18:56 +09:00
Hyukwoo Park
8850b0103f Implement for-of statement (#205)
* merging for-of and for-in statement
* remove unnecessary bytecodes

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-04-23 15:29:40 +09:00
Robert Fancsik
ae28733902 Implement spread operator (#168)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-12 09:24:56 +09:00
Hyukwoo Park
41475227ee Fix instanceOf operation for bind function (#176)
* implement getting instanceOf handler part [es6]
* update instanceOf operation for bound function

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-04-03 14:55:55 +09:00
Roland Takacs
8a37c3ad68 Use default argument value in ByteCodeInterpreter::interpret() (#173)
Signed-off-by: Roland Takacs <rtakacs.uszeged@partner.samsung.com>
2019-04-02 14:12:43 +09:00
Tóth Béla
47dce1c42b Merge collapsible if statements (#171)
Merged Collapsible if statements reported by SonarCloud.
Also unified some code in Lexer, to follow this ruleset.

https://sonarcloud.io/project/issues?branch=travisMoka&id=Achie72_escargot&resolved=false&rules=cpp%3AS1066&severities=MAJOR

Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2019-03-28 16:53:51 +09:00
Hyukwoo Park
cc546ca624 Update the rest of TypedArray builtin functions Part 4. (#159)
* from, of, get species builtin methods of TypedArray updated
* isCallable and isConstructor modified to commonly used in Value
* Symbol species also updated

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-03-25 15:54:30 +09:00
Daniella Barsony
4afdf61b2b Pass const primitive values by value rather than reference (#115)
Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-03-18 15:00:31 +09:00
Robert Fancsik
e4dac958d0 Implement the class language element part I. (#141)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-15 19:59:39 +09:00
Zoltan Herczeg
8fbf6d05ed Directly jump to the next opcode in the byte code interpreter. (#116)
Also fix misaligned lines.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-03-04 10:55:59 +09:00
Peter Marki
2ad365189d Use initializer lists where possible (#105)
https://sonarcloud.io/organizations/pando-project/rules?open=cpp%3AS3230&rule_key=cpp%3AS3230

Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-02-26 14:28:05 +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
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
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
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
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
Akos Kiss
8f6925acc7 Fix warnings reported during compilation on macOS (#32)
* Use non-universal compiler options for gcc only

Compiler of macOS (clang) doesn't support all options currently
used. Optimization flags `-frounding-math` and `-fsignaling-nans`
are not supported, while warning options
`-Wno-unused-but-set-variable` and `-Wno-unused-but-set-parameter`
are unknown.

Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>

* Remove deprecated register storage class specifier

The storage class specifier `register` was deprecated in C++11 (and
is incompatible with C++17, where the keyword is unused and
reserved).

Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>

* Remove extraneous parentheses from around equality comparison

Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>

* Don't use memcpy on PointerValue objects

Class `PointerValue` and its descendants are dynamic classes, their
instances have a vtable pointer. C functions like `memcpy` know
nothing about C++ classes and object memory layouts, so using
C-style memory access to C++ objects with vtable pointers makes the
compiler complain.

This patch replaces `memcpy` with a more C++-ish approach.

Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
2019-01-02 17:48:01 +09:00
박혁우/Common Platform Lab./Staff Engineer/삼성전자
f3f0fdd73b Implement 'get' and 'set' for 'Proxy' (#106) (#179)
* also update vendortest to handle es6 features

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2018-12-18 09:54:02 +09:00
최현/Tizen Platform Lab(SR)/Staff Engineer/삼성전자
f83bde0cd1 Update macro usages to be compatible with newer compilers (#118)
Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2018-07-12 13:29:45 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
d66c4b900b Enhance developer experience (#98)
* Generate more detailed information(+ add related source code info)
* Fix source code line error on exception
* Add DUMP_ERROR_IN_TRY_CATCH option

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-06-19 18:04:19 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
470d1374a8 Implement lazy LOC computing when got exception for performance (#88)
* update windows build stuffs

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-31 15:31:37 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
c34461310f make test262(ES5) runnable on Windows (#78)
* add icu as submodule
* Fix some wrong implemations
* Remove functions defined on ctypes.h. its implemations slightly different on POSIX and Windows.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-14 15:19:55 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
6b76791e32 Make compilable in clang (#71)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-04 16:44:19 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
68b8868018 Implement TemplateLiteralNode, TaggedTemplateExpressionNode (#65)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-04-23 14:30:05 +09:00
이승수/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
28de827199 Change default license to LGPL license (#60)
* Update build spec file
* Add License files

Signed-off-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
2018-03-07 18:38:28 +09:00
최현/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
a750632299 Bugfix exception handling (#47)
* credit to sh8281.kim

Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2018-01-22 14:16:31 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
e66f512b32 Implement ES6 Symbol.hasInstance, iterator, toStringTag, toPrimitive and built-ins (#46)
* Implement Array.from
* Disable part of ES6-shim due to wrong implementation

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-01-19 15:20:27 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
28f6a51c31 Implement ES6+ String methods, Iterator, Map, Set Object (#43)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-01-15 19:58:01 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
cf31082836 virtual ID are should pretend to property of global object (#35)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-12-15 10:24:57 +09:00
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
03b743d8fd 1. Implement stack property in ErrorObject (#5)
2. Fix new operation bug with bound function
3. Fix parameter copy bug

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-06-21 20:21:38 +09:00
seonghyun kim
dbc21192e3 implement Promise, gc, virtual property, virtual id things
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-25 13:15:38 +09:00
seonghyun kim
b5eb18a2dc implement more basic things in api layer
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-23 20:53:26 +09:00
seonghyun kim
20790b0be1 add old legacy functions(__defineGetter__, __defineSetter__, __lookupGetter__, __lookupSetter)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-18 12:20:27 +09:00
seonghyun kim
40ef7b7a46 1. fix gc memory bug related with GetObjectPreComputedCase ByteCode
2. update chakracore data file
3. enable chakracore test in pipeline in gitlab

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-17 13:42:37 +09:00
seonghyun kim
19110310f0 1. update tools/vendortest/chakracore/chakracore.run.sh for right result
2. update chakracore xml files

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-16 22:17:54 +09:00
seonghyun kim
f234131c6c 1. use right receiver calling setter in GetObjectOperation
2. when evaluate evalLocal operation, flag of inside of with statment should propagate into inside CodeBlock due to using CallInWithOperation instead of CallOperation
3. restict using of RegisterCopySkip mode in CompoundAssigmentNodes
4. In with statement, every continue statement to outer statement is not allowed except label for literation

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-11 17:33:45 +09:00
Saebom Kim
e21444c38a Fix some bugs detected from chakracore TC & Add essential test environments
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-05-11 13:03:57 +09:00
Saebom Kim
5cefb08f12 1. If there is a deleted element in FastModeArray, it should not skip updating its enumeration data
2. If setObjectPreComputedCase decides to make no more caches because of many cacheMisses, it should invalidate previous caches

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-04-19 17:13:32 +09:00
seonghyun kim
a98bf4ec1b 1. add FUNCTION_OBJECT_BYTECODE_SIZE_MAX as config flag
2. divide CodeBlock into CodeBlock and InterpretedCodeBlock for saving memory
3. expand SCANNER_RESULT_POOL_INITIAL_SIZE to 128
4. connect String -> AtomicString with remaining space of String::m_tag
5. optimize Function.bind

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-14 13:20:08 +09:00
seonghyun kim
0e2e594a55 1. divide FunctionObject::call into call and newInstance
2. fix test262(x64) crash
3. process new operation with binded function correctly

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-06 14:55:07 +09:00
seonghyun kim
c88d71bfcc 1. call eval function should consider with scope
2. when function name explicitly declared in its scope, initial value of function name is undefined
3. Function ctor should consider comments correctly
4. evaluate MemberExpression correctly
5. reset RegExpObject::lastIndex correctly

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-04 17:22:32 +09:00
seonghyun kim
ee1dcad092 1. revise DeclareFunctionExpression as CreateFunction
2. evalute function decl in catch correctly
3. give receiver of get, set in interpreter correctly
4. give right StackTrace information in with, try-catch for user
5. fix bug in argument object around get, set variable

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-31 21:30:01 +09:00
seonghyun kim
61f1065a7f 1. fix typo error in GlobalObject::eval
2. DeclarativeEnvironmentRecordNotIndexedForCatch for evalutate calling eval function in catch
3. evalutate computed flag of PropertyNode properly

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-31 12:58:37 +09:00