Commit graph

29 commits

Author SHA1 Message Date
김승현/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
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
74869c1ec9 1. remove RELEASE_ASSERT_NOT_REACHED in ScriptParser
2. fix a floating point precision bug in DateObject
3. fix a bug in Math.round() which occured with big integer

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-05-12 20:18:22 +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
a7aa4ea929 1. Re-implement Date.prototype.toLocale* using icu library
2. Fix bug on Array.prototype.splice()
3. Add a member variable holding locale information into VMInstance

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-04-10 14:08:20 +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
Saebom Kim
ab00bdfdd2 1. Object derived from primitive value can't define its new property
2. Fix bug with floating point precision in Date.parse
3. Fix bug in Date.setYear()/setFullyear() occured with invalid date value

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-30 20:51:56 +09:00
seonghyun kim
e7df366d73 1. fix bug in Object.setPrototype
2. revise rule of generate name of binded function
3. revise order evalutate CallEvalFunction opcode
4. process invalid lhs assignment correctly
5. allow \n\r in string literal
6. implement change property of binding correctly
7. Date.prototype.toGMTString and toUTCString should be same
8. fix bug in Function ctor
9. add stack checking in parseJSONWorker
10. use double_conversion with Number.prototype.toFixed, toPrecision
11. add has8BitContent for RopeString for prevent stackoverflow when invoke child::has8BitContent

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-29 22:36:40 +09:00
Saebom Kim
add7a8266d 1. Fix a bug on ArrayObject::defineOwnProperty for "length" property
2. Changed the order of evaluting parameters in Date.prototype.set* series

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-23 14:44:25 +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
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
Saebom Kim
83c0fd9297 Exclude some TCs from SpiderMonkey which are out of spec
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-02-21 15:14:45 +09:00
Saebom Kim
50eaddc6a6 Implement more Date prototype functions and fix bug on Number.prototype.valueOf
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-02-14 14:11:14 +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
Saebom Kim
d2aae57751 Fix some bugs and reduce memory usage from DateObject
* Manage a corner case in computing node LOC from bytecode
  * Change the VM's timezoneID setting to be lazy (because of a memory usage)
  * Fix some bugs on DateObject operation

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-02-13 10:36:25 +09:00
Saebom Kim
a4a468a9ce Refactor Date builtin & fix some bugs in it
* Reserved (1LL << 63) for representing NaN in DateObject
  - and removed most of double type variables
* Removed leftovers of 'struct tm'
* Set cachedUTC for quick UTC conversion
* Fixed bugs in
  - Date.prototype.setFullYear() with NaN value
  - Date.prototype.setUTCString()
  - Date.prototype.toTimeString() with 30-minute or 45-minute timezone

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-02-03 18:46:23 +09:00
seonghyun kim
81a929e45a 1. implement ArrayBufferObject
2. use FastAccessObjectStructor for Built Function prototypes

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-05 16:59:55 +09:00
seonghyun kim
9405b56d82 1. fix setting array length bug
2. optimze reduce array length
3. implement escape, unescape
4. implement rest of Array.prototype builtin functions

this patch pass all of test262(5.1)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-04 12:35:54 +00:00
Eunji Jeong
ff5be05310 Implement and refactor Date builtin 2017-01-03 20:16:45 +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
Junyoung Cho
1447526e24 Implement Number/String.prototype.valueOf
Fix primitive type conversion bug in Date
Add constructor property to Built-in object functions
2016-12-23 15:50:58 +09:00
seonghyun kim
ef08833f55 implement prototype of builtin Functions properly
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-22 11:20:29 +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
Junyoung Cho
ac9b7b10f5 rename:
ObjectPropertyDescriptor->ObjectStructurePropertyDescriptor
ObjectPropertyDescriptorForDefineProperty->ObjectPropertyDescriptor
2016-12-19 20:52:18 +09:00
seonghyun kim
98aaf50356 1. implement many part of Date object
2. implement SwitchStatement
3. fix Script parsing bug

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-16 21:04:49 +09:00
seonghyun kim
64a56ae946 1. re-implement Object::defineOwnProperty
2. implement String.prototype.match, replace

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-14 16:17:11 +09:00
seonghyun kim
88a79914ae implement for-in statement
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-13 19:50:04 +09:00
seonghyun kim
52dc57eca5 add missing Date files
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-12 11:35:47 +09:00