Commit graph

96 commits

Author SHA1 Message Date
Peter Marki
95529f563d Implement the Symbol.species well-known Symbol (#140)
Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-04-08 14:11:36 +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
Hyukwoo Park
82a10e89bc Update Iterator Operations (#146)
* implement getIterator, iteratorNext, iteratorComplete, iteratorValue, iteratorStep, iteratorClose, createIterResultObject method
* fix to correctly use iterator operations based on the ES2015 spec

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2019-03-15 20:05:21 +09:00
Peter Marki
f56e629bc9 Implement the @@isConcatSpreadable well-known Symbol (#121)
Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-03-13 12:59:10 +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
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
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
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
Robert Sipka
aca603a7eb Do not get the object property descriptor`s value if it is not present (#45)
Fixes #28

Signed-off-by: Robert Sipka <rsipka.uszeged@partner.samsung.com>
2019-01-10 14:01:42 +09:00
Akos Kiss
1e988528f7 Simplify code paths and fix style issues in Object::defineOwnProperty (#46)
- Merged `if (A) { if (B) {} }` constructs into `if (A && B) {}`.
- Rewrote simple if-else's to `?:`.
- Reorganized if's not to re-test conditions.
- Added some missing braces to single-statement branches of if-else's.
- Fixed the indentation of some comments.

Signed-off-by: Akos Kiss <akiss@inf.u-szeged.hu>
2019-01-07 14:48:51 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
ee036ce97f Optimize script parser (#173)
* Implement lazy string literal parsing
* Fix bug in Vector

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-12-13 10:35:17 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
b3f8e0105a Optimize ScriptParser & redesign String classes (#68)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-04-27 13:06:43 +09:00
최현/Tizen Platform Lab(SR)/Senior Engineer/삼성전자
ca52b9677e Fix SVACE issues (#66)
Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2018-04-25 08:13:02 +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
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
91d02bc621 Sort function can get unstable array. (#30)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-11-25 13:33:56 +09:00
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
ed98148a39 Enhance Public API & Fix some memory bugs (#14)
* Enhance Public API & Fix some memory bugs
* Implement Object::getOwnPropertyKeys

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-08-09 16:50:34 +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
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
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
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
30489bbf09 1. revise builtinObject__proto__Setter to ignore undefined input
2. change order of evaluate ObjectPropertyDescriptor::ObjectPropertyDescriptor
3. give name to object getter, setter

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-30 14:20:58 +09:00
Saebom Kim
a904501b75 Combination of [try|catch|with] and controlflows works correctly
- add member m_outerLimitCount into class ControlFlowRecord to save tryStatementScopeCount of the jump destination

* fix bug in Array.prototype.concat()
 - It will check the length of the array overflows or not

* fix bug in setting __proto__
 - when setting __proto__ to non-object, non-null, non-undefined value, it should do nothing

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-28 18:25:45 +09:00
seonghyun kim
811cc9553f 1. setting array.length to writable false while writing length is should correctly evaluated
2. revise Array.prototype.{splice, slice, shift, unshift}
3. change Object::nextIndexForward, Object::nextIndexBackward to return existence of index

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-28 14:23:48 +09:00
seonghyun kim
82f3d75103 1. implement ToStringRecursionPreventer
2. improve internal test and its driver to support v8 vendortest

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-24 21:29:03 +09:00
seonghyun kim
34dad07c79 move VM-bound data into VMInstance from context
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-23 18:48:02 +09:00
seonghyun kim
6873cb9a75 1. remove wrong ASSERT macro in var declatiotor node
2. remove wrong method Object::get(state, name, receiver)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-23 14:28:41 +09:00
seonghyun kim
60ebc7c688 1. escargot should throw error when writing setLastIndex. if setLastIndex of RegexpObject is setted as non-writable
2. treat series of "if (true) function() {}" correctly

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-22 13:44:03 +09:00
Saebom Kim
243c8c2c2b implement more about DefineOwnProperty() of ArrayObject
* "length" property of ArrayObject is treated with special flow when defined
* fix bugs in Object::defineOwnProperty() which occured when "value" property is not given

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-22 10:06:53 +09:00
Junyoung Cho
e060ee1cef 1. [jetstream] Show geomean for each category
2. Consider __proto__ in Object Initializers(e.g. var a = {__proto__ : o}) and cyclic __proto__
3. Update sunspider script in gitlab-ci

Signed-off-by: Junyoung Cho <june0.cho@samsung.com>
2017-03-10 18:24:48 +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
9d69187ee0 More SpiderMonkey TCs passed
* when getting a property of GlobalObject, we should think of its prototype
* if there is no parameter to Date.set* series functions, it should return NaN
* when array is parsed as JSON, the type of key is string, not number
* in Object.defineProperty(), original value with accessor should be found correctly

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-10 16:31:37 +09:00
seonghyun kim
d5cc12fb8d 1. remove possibility of to occur danging pointer in Get, SetGlobalObject ByteCode
2. optimize Call, New, UpdatePostfix expressions\
3. reduce recursive limit of esprima_cpp
4. give random seed
5. fix update for in data bug

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-07 21:05:43 +09:00
Sanggyu Lee
96441c64c9 Add C++ unittest build script and initial testcase
- Enable shared library building
- Turn off promise on unittest build
 : For promise, the client must provide code for class JobQueue.
   There is documentation. Fortunately we don't need it in current unittest.
- Fix not-enclosed promise code in Object.cpp

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
2017-03-07 14:35:53 +09:00
Junyoung Cho
0d93c8e2fe Seperate original src/heap directory into submodule GCutil and src/heap
Now,
 - GCutil has bdwgc and general GC Utilities (LeakChecker, allocator
         wrapper)
 - src/heap has Escargot-dependent functions (Custom Allocator,
         LeakCheckerBridge for global function support)
2017-02-23 13:21:22 +09:00
Junyoung Cho
643d608d99 1. Fix gbs build error for debug: resolve uninitialize error
2. Fix bytecode generation bug in with
2017-02-13 12:59:16 +09:00
seonghyun kim
8c661ddf41 1. seperate ReturnFunction code to ReturnFunction and ReturnFunctionWithValue
2. add ObjectDefineOwnPropertyWithNameOperation code for remove useless ObjectPropertyName(ExecuteState, Value) call in interpreter
3. add ObjectPointerTag in Value::tag for 32bits. this gives better performance for Value::isObject, Value::isString function
4. optimize FunctionObject::call, Value::isPrimitive function

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-13 10:36:26 +09:00
seonghyun kim
1b044658fc 1. remove libunwind from Makefile & source
2. disable thread function in bdwgc
3. remove m_version from ObjectStructure
4. add rawBuffer in TypedArrayObject
5. remove wrong usage of Value::toArrayIndex and Value::toIndex
6. optimize String::tryToUseAsArrayIndex, String::tryToUseAsIndex

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-13 10:36:25 +09:00
seonghyun kim
0f1cc8999c 1. diet native getter, setter on Object
2. diet ByteCode
3. use get, setIndexedProperty in ByteCodeInterpreter
4. implement get, setIndexedProperty for typed array
5. move implemention of CallNativeFunctionOpcode to FunctionObject::call
6. remove m_contentLength, m_has8BitContent in RopeString
7. optimize ByteCodeInterpreter::getObjectPrecomputedCaseOperation, setObjectPrecomputedCaseOperation
8. diet Arguments object

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-13 10:36:25 +09:00
seonghyun kim
e305e378cb 1. add CodeBlock::m_hasArgumentsBindingInParameterOrChildFD for boost FunctionObject::call performance
- hasArgumentsBindingInParameterOrChildFD is computed every function calling before
2. computing ExtendedNodeLOC bug with global CodeBlock when source code has comment at the front
3. add default object structor for arguments object
4. implement Object::getIndexedProperty, Object::setIndexedProperty
5. use SmallValueVector in Env record instead of ValueVector

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-13 10:36:25 +09:00
seonghyun kim
357ae0ac26 re-implement Arguments Object
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-06 12:58:52 +09:00
seonghyun kim
a8754aac97 Merge Object::m_rareData with Object::m_prototype
Object::m_rareData share space with Object::m_prototype
- ObjectRareData inherits PointerValue

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-02 12:17:04 +09:00
Junyoung Cho
08c380c01b Fix error causing by older version gcc to support tizen_obs_arm build 2017-01-20 18:45:14 +09:00
seonghyun kim
2fc34d628a 1. use typed allocate for all long-live objects
2. implicitly delete AST when ast is useless
3. allocate String::emptyString correctly
4. hide ptr in LeakChecker for better tracing

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-20 15:51:47 +09:00
seonghyun kim
dbbbdf2374 allocate almost gc objects as typed gc object
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-18 20:28:45 +09:00
seonghyun kim
fd9fc94072 1. reduce byteCode Register size
2. remove ast implicitly when use less avoiding memory leak
3. change ByteCodeBlockData gc type into atomic
4. add literal info into ByteCodeBlock
5. force enable eager sweep
6. divide GC_mark_and_push_custom into GC_mark_and_push_custom_iterable and GC_mark_and_push_custom

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-17 18:27:24 +09:00
seonghyun kim
abc8d38ff7 optimize Object::enumeration
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-13 14:37:38 +09:00
seonghyun kim
824e750e8a 1. argument order of FunctionObject::call is fixed
2. connect ExectionContext in GlobalObject::eval
3. remove ByteCodeBlock if needed

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-10 15:56:23 +09:00
seonghyun kim
adc1b3cea1 1. optimze write, read global object in interpreter
2. optimze write, read object in interpreter

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-09 20:15:15 +09:00