Commit graph

39 commits

Author SHA1 Message Date
seonghyun kim
82c99fc298 Refactor ObjectStructure
* Divide ObjectStructure into 3 types
* Add transition look up hash map into ObjectStructureWithTransition
* Use faster version of log2 on Vector

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-11-12 10:03:03 +09:00
seonghyun kim
0e3e95b3ae Update yarr version to webkitgtk-2.19.92
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-11-04 13:21:11 +09:00
Tóth Béla
44e90a6b91 Implement the @@match well-known Symbol (#157)
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2019-10-11 14:46:27 +09:00
Patrick Kim
4432709661 Revise RegExp module (#411)
* Update yarr (webkitgtk-2.18.5) & import into repo
* Implement new RegExp ES6 error when unicode flag is on
* Fix ignorecase bug on RegExp

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-09-04 14:12:01 +09:00
Robert Fancsik
387a30267c Simplify isRegExpObject check (#399)
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-09-02 20:26:59 +09:00
Daniel Balla
f1e3df6832 Modify RegExp property getters, isRegExpObject check (#271)
Fixes `regexp-flags.js` testcase in v8.

Co-authored-by: Robert Fancsik <frobert@inf.u-szeged.hu>
Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
2019-05-29 14:44:03 +09:00
Daniel Balla
133bc131c8 Add ES6 RegExp.prototype.exec() method (#112)
Add ES6 support to RegExp.prototype.exec method.
Also fix regexp-lastIndex.js test in v8.

Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
2019-05-22 10:43:12 +09:00
yichoi
329ed6f1da
Resolving Static Analysis Defect (Uninitialization of Constructor) (#169)
Signed-off-by: Youngil Choi <duddlf.choi@samsung.com>
2019-03-27 14:07:56 +09:00
Daniel Balla
84dc59f389 Fix RegExp.prototype.toString() function (#118)
The function had a wrong behaviour expecting `this` value to be a RegExp Object.
However as the standard says `this` value should be an Object, and its `source` and `pattern` values' `toString()`s should be returned in a form of `/<source>/<flags>`.
Fixes #117

Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
2019-03-12 13:56:02 +09:00
Daniel Balla
26ee1718c5 Add RegExp.compile() function (#100)
This patch adds RegExp.compile() function.
Since the given argument can be a RegExp object as well, which already has their option flags parsed there was a need to add a new init function which doesn't parse flags and accepts an `unsigned int` as its parameter.

Signed-off-by: Daniel Balla <dballa@inf.u-szeged.hu>
2019-02-20 16:14:31 +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
김승현/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/삼성전자
ef57dc3400 Optimize ScriptParser more (#70)
* Diet ScannerResult
* Use SourceStringView if possible for reducing memory usage

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-04 13:44: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/삼성전자
d378293486 Implement legacy RegExp spec (#34)
* RegExp.$1-$9
* RegExp.input ($_)
* RegExp.lastMatch ($&)
* RegExp.lastParen ($+)
* RegExp.leftContext ($`)
* RegExp.rightContext ($')

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-12-14 12:07:15 +09:00
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
b8d3eca96e Reducing memory usage & Fix bug (#11)
* Implement ShortStringView
* Fix bug in escapeSlashInPattern

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-07-26 08:35:43 +09:00
Saebom Kim
6d4ed41488 1. When 'writable' property of array length turned into 'false', convert it into NonFastMode
2. If RegExp's source needs escapeSlash process, it should count the number of leading backSlashs

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-04-05 19:28:08 +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
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
Youngil Choi
e02af7daf8 Add License Clauses
Signed-off-by: Youngil Choi <duddlf.choi@samsung.com>
2017-03-10 18:06:20 +09:00
seonghyun kim
2bafeb2750 1. improve StringBuilder
2. prevent memory leak from RopeString
3. optimize GetGlobalObject, SetGlobalObject
4. move FunctionObject::isConsturctor to CodeBlock
5. optimize esprima_cpp
6. optimize String

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-06 21:58:40 +09:00
seonghyun kim
132f7f5316 1. implement Latin1String for reducing memory usage
2. add Makefile as dependency of make

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-03 19:06:15 +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
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
6dc9f5dd61 RegexMatchResult should not require gc allocator
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-12 12:34:30 +09:00
Eunji Jeong
519403ed01 Implement & fix string builtins and refactor RegExpObject 2017-01-03 17:20:59 +09:00
Eunji Jeong
709b364547 Pass test262 Object.prototype.defineOwnProperty tests except for arguments 2017-01-03 12:07:54 +09:00
Junyoung Cho
f67a43724d Fix RegExp builtin bug(15.10) 2017-01-02 22:17:57 +09:00
Junyoung Cho
ac9b7b10f5 rename:
ObjectPropertyDescriptor->ObjectStructurePropertyDescriptor
ObjectPropertyDescriptorForDefineProperty->ObjectPropertyDescriptor
2016-12-19 20:52:18 +09:00
seonghyun kim
61eb45b0c7 1. optimize String buffer acquire functions
2. implment String.prototype.toLowerCase, toUpperCase
3. implment Array.prototype.sort
4. fix codeBlock bugs

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-15 11:37:25 +09:00
seonghyun kim
c22735e9b3 implement String.prototype.match, parseInt
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-14 18:55:05 +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
Junyoung Cho
2e20b9d9ea Implement Math.random, floor, ceil, log.
Remove argc guard in RegExp builtin functions.
Support only parsing for ES6 Sticky, Unicode option.
2016-12-14 14:54:57 +09:00
Junyoung Cho
5413d914fc Implement RegExp.prototype.test. Modify isASCIIString->hasASCIIContent in checking ASCII Contents 2016-12-14 13:14:52 +09:00
seonghyun kim
eb18661b6e 1. implement for (var i in ...)
2. implement parse RegExp in script

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-14 10:51:11 +09:00
Junyoung Cho
f5dedf5c66 Apply make tidy 2016-12-13 19:13:33 +09:00
Junyoung Cho
1e0c0aff4c Support RegExp Object and inner method
* Updated third_party/yarr to diet ver.
2016-12-13 19:10:05 +09:00