Commit graph

39 commits

Author SHA1 Message Date
MuHong Byun
e2f1c3f47d Fix LGPL License verison typo (2.0 -> 2.1)
Signed-off-by: MuHong Byun <mh.byun@samsung.com>
2020-03-10 11:35:20 +09:00
seonghyun kim
53906a6d81 Optimize runtime performance
* Optimize ObjectStructurePropertyDescriptor
* Don't initialize inline storage of VectorWithInlineStorage
* Add Object::setPrototypeForIntrinsicObjectCreation for fast initialize
* Add ArrayObject::ArrayObject(ExecutionState& state, const uint64_t& size) for fast initialize
* Store stack-limit instead of stack-base
* Reduce size of ExecutionState
* Add fast version of Object::ownPropertyKeys for optimize Object.keys
* Add ValueVectorWithInlineStorage
* Remove some compiler warnings

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-12-05 15:04:20 +09:00
Patrick Kim
eceffac4c4 Implement Direct {Import, Export} (#448)
* Rename ESCARGOT_OUTPUT=bin into shell and make shell_test for testing.
* Remove ESCARGOT_SHELL, -SCARGOT_STANDALONE and Rename ESCARGOT_ENABLE_VENDORTEST into ESCARGOT_ENABLE_TEST.
* Fix bug in PersistentRefHolder
* Add DebuggerStatementNode for preventing parsing error even if we cannot support
* Revise Platform layer for supporting es6 module
* Implmenent class constructor toString

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-10-07 13:11:03 +09:00
Patrick Kim
98d3c9c26e Fix class bugs (#418)
* Fixup class parsing error check in esprima
* Class cannot have property named 'prototype'
* When define {getter, setter} in interpreter, property key can be symbol
* Reorder properties on class constructor
* Fixup public API

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-09-09 10:12:47 +09:00
Hyukwoo Park
474b917ecb Fix some bugs in Patterns (#412)
* add check code for ObjectPattern without AssignmentPropertyList
* handle the case when value of PropertyNode is a MemberExpression
* add generateStoreByteCode module for SpreadElement
* pass related TCs in test262

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-09-05 12:44:09 +09:00
Patrick Kim
3c0a1cfddd Don't use heap allocated lexical environment if possible (#378)
- We should not heap allocated env on...
  * functions uses variable on upper function
  * functions have `typeof` operation
  * functions have unmapped arguments object
- Improve calling function performance by remove accessing vtable once in interpreter(from isCallable, call to just call)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-08-20 10:41:06 +09:00
Patrick Kim
876fd29b34 Improve performance (#337)
* Optmize String.protype.split function.
  when separator comes to RegExpObject split function, we have to call @@split function when there is a @@split function.
  old one is correct implementation but performance is bad...
  but we already have optmized split function with RegExp in builtinStringSplit.
  I make to use old one when if user didn't defined own @@split function.
  RegExp test score is changed from 57 to 280 in my computer.

* Make Value::isCallable inline-able.
* Make to use shared data among {Get,Set}GlobalVariable. this may reduce usage & improve performance

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-07-30 18:07:13 +09:00
Patrick Kim
2a54ab5e02 Update lexical environment stuffs (#327)
* treat variable in catch() as let
* add lexical environment record data into global environment for saving global permanently
* re-implement variable access bytecode generation
* re-implement class initialize operation
* re-implement global variable access bytecode for support lexcial variables in global
* fix bugs related with per-iteration lexical environment in for-statement

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-07-26 13:16:44 +09:00
Patrick Kim
d1b4ced24c Update lexcial environment. (#313)
- Store lexcial block informantion in InterpretedCodeBlock.
- If lexcial block has no lexcial variables, we should collapse the block.
- If there is no heap-allocated variables in lexcial environment, we can skip allocation of the environment.
- Implement Indexed storage for lexcial environment.
- Allocate lexcial variables in function stack storage if possible.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-07-18 15:34:10 +09:00
Robert Fancsik
ef59096112 Implement the lexical scoping (#285)
This patch introduces the let and const keyword and all the related lexical scoping rules.

Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-05 13:38:11 +09:00
Hyukwoo Park
e4a8b22032 Revise call and construct operation based on ES6 (#278)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-06-10 20:04:15 +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
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
kisbg
02f462a481 Reduce code smell -Remove setPrototype method in constructor/destructor. (#109)
https://sonarcloud.io/project/issues?id=pando-project_escargot&resolved=false&rules=cpp%3AS1699&severities=CRITICAL&sinceLeakPeriod=true&types=CODE_SMELL

Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
2019-03-04 20:25:32 +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
Robert Fancsik
bbae70a565 Fix uint32_t overflow during ArrayBuffer buffer allocation (#4)
This patch fixes #2.

Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2018-12-12 20:00:07 +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/삼성전자
e94a02a0cf Add build artifacts for MSVC 15.0 & Make compilable in MSVC (#76)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-10 17:37:26 +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)/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
seonghyun kim
f43006313d when evaluate BinraryExpressions, use direct stack registers carefully
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-12 15:39:09 +09:00
Saebom Kim
d9e72cf760 Implement DataView(ES6) object, and fix bugs on TypedArray object
- bug fixes
  * Change types of some errors from TypeError to RangeError
  * Get rid of divide-by-zero case
  * Fix unsigned-signed comparison code

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-04-24 17:06:16 +09:00
seonghyun kim
35ceec9680 1. not every binding is mutable in strict mode
- add m_isExplicitlyDeclaredOrParameterName into name info in ASTScopeContext
  - add m_isMutable into IdentifierRecord struct
  - add ThrowStaticExcpetion opcode in indexed-mode
  - add throw exception code in storeByName operation
2. when evaluate delete operation on member variable, must evaluate toString operation once for name even if exception throws
3. in strict mode, Decimals with leading zero literals are not allowed

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-22 22:33:34 +09:00
seonghyun kim
f51edbe5d9 1. initialize message variable of ErrorObject correctly
2. merge DeclareFunctionDeclaration, DeclareFunctionDeclarationsInGlobal into DeclareFunctionDeclarations
3. implement EnvironmentRecord::initializeBinding for initialize function decl.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-21 21:49:24 +09:00
Youngil Choi
e02af7daf8 Add License Clauses
Signed-off-by: Youngil Choi <duddlf.choi@samsung.com>
2017-03-10 18:06:20 +09:00
Saebom Kim
98c50a4834 Pass some more SpiderMonkey tests and stabilize it
- gitlab-ci will not allow SpiderMonkey's failure
- fix typos
- subdivide cases when there is controlflow in 'with' operation
- Function.prototype.call should initialize arguments field even if there isn't any value
- implement Number.prototype.toLocaleString
- construct m_objectPrototypeToString
- upgrade check_tidy.py to print filenames which are not tidy

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-02-23 10:28:15 +09:00
seonghyun kim
f44a2a00a2 1. implement stack limit in Function::call
2. implement stack limit in escprima
3. replace RELEASE_ASSERT_NOT_REACHED() with throwing parse error in esprima
4. impement size limit of String
5. expose config parameters in Escargot.h

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-22 16:01:26 +09:00
Eunji Jeong
c8840465d1 Pass tests in es5 test262 ch15.2.3.3 (except for URI-related features)
- Add every builtin function templates in es5
- Modification on Makefile target "check" should not trigger rebuild
- Add JSON object
- Implement some toString functions
- Initialize m_value properly in ObjectPropertyDescriptor constructor
2016-12-29 22:39:02 +09:00
seonghyun kim
d2a17f1be3 1. implement parseFloat
2. implement missing functions in Math
3. Fix delete expression bug
4. Fix Error Object bug
5. implement String.prototype.reverse

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-23 23:24:11 +09:00
seonghyun kim
5bca24da82 1. implement ObjectDefineOwnPropertyOperation
2. Add errorcode in ScriptError
3. Fix array length bug
4. Fix ObjectPropertyDescriptor::ObjectPropertyDescriptor(ExecutionState& state, Object* obj)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-23 22:21:22 +09:00
seonghyun kim
11e625f373 1. implement instanceof, in, delete operator
2. VariableDeclaratorNode does not affect execute result
3. optimize Object get, set in interpreter

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-20 13:31:49 +09:00
seonghyun kim
efb82ad9b5 1. implement ArrayObject
2. implement UnaryNot, Math.sqrt, break statement
3. add make tidy
this patch pass bitops-nsieve-bits.js, access-fannkuch.js, access-nbody.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-08 17:25:48 +09:00
Junyoung Cho
f7a22f54fc Apply clang-formatting 2016-12-08 14:53:01 +09:00
seonghyun kim
f2e8463092 1. redesign Object api
2. implement ObjectPropertyName type

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-07 22:10:23 +09:00
seonghyun kim
6a758afc72 1. implement new, this expression
2. implement Math.max
3. implement unary plus, minus
this patch pass access-binary-trees.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-07 18:44:47 +09:00
seonghyun kim
288b147659 1. implement tracing stack when got exception
2. binding function name
3. implement sandbox for isolate throw exception
4. implement object expression
5. implement get, set object operation
6. implement logical and, or operation

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-06 22:22:04 +09:00
seonghyun kim
887758e247 1. implement basic of Builtin Object, Function
2. implement Error Objects
3. implement basic errors

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-02 20:49:04 +09:00
seonghyun kim
a545adebf5 implement declare var, Function Decl, Function Expression
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-30 19:01:37 +09:00