Commit graph

83 commits

Author SHA1 Message Date
이승수/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
seonghyun kim
b48a1ee9a2 1. fix bug in Object::getOwnPropertyUtilForObjectAccCase
2. remove throw exception in Global.load

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-09 13:22:49 +09:00
Eunji Jeong
b79536b9c9 Support full functionalities of Promise object 2017-01-05 13:28:07 +09:00
seonghyun kim
c970d99552 1. fix bug in Object::nextIndex*
2. implement ::generateCodeBlockTreeFromASTWalkerPostProcess

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-04 15:22:12 +09:00
seonghyun kim
2057250e48 implement Array.prototype.indexOf, Array.prototype.lastIndexOf
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-04 15:18:58 +09:00
seonghyun kim
2ab167a980 1. add m_isRemovedOnRedefineProperty on NativeGetterSetter data
2. add rest of arguments test in test262 5.1

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-04 11:14:52 +09:00
seonghyun kim
d6a08e6c82 re-implement ArgumentsObject index getter, setter(non-strict mode)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-03 21:07:07 +09:00
seonghyun kim
7a7d339161 re-implement set ArrayLength
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-03 17:51:35 +09:00
seonghyun kim
1c3de89dfd implement Array.prototype.shift
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-03 17:51:35 +09:00
Eunji Jeong
709b364547 Pass test262 Object.prototype.defineOwnProperty tests except for arguments 2017-01-03 12:07:54 +09:00
seonghyun kim
9340d87ded 1. fix ArrayIndex uint32 into uint64
2. fix Invalid ArrayIndexValue into 2^32 + 1
3. fix Array.prototype.push bug
4. implement part of Array.prototype.splice

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-02 21:33:59 +09:00
seonghyun kim
a85ee09334 re-implement arguments object binding
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-02 16:10:26 +09:00
Junyoung Cho
5d36237438 Change receiver type to Value instead of Object* (consider receiver with primitive type) 2017-01-02 12:59:52 +09:00
Eunji Jeong
35a41bf412 Fix some of bugs in [[DefineOwnProperty]] 2016-12-30 14:07:02 +09:00