Commit graph

25 commits

Author SHA1 Message Date
Seonghyun Kim
caa0fbc3fe Implement compress CompressibleStrings on GC reclaim end event
* Compress CompressibleStrings on GC reclaim end event
  - if there is reference about data of CompressibleString on stack, we should give up compressing.
    we don't need to search heap space because I redesigned StringView
    (we should not store string buffer data on heap without owner)
* Redesign StringView
  - Don't save string buffer address as its member. because buffer of CompressibleString can be deleted
  - If we don't save string buffer address on StringView, parser performance may dropped.
    becuase parser access string data a lot.
    so I introduce ParserStringView. it saves buffer address. we should ParserStringView on parser only.
    we can save string buffer address while parsing. because GC is disabled while parsing.

* Enable CompressibleString always
* Implement cache of RegExpOptionStrings
* Implement finding system locale function on RuntimeICUBinder avoiding call uloc_getDefault.

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-01-10 17:37:00 +09:00
seonghyun kim
fba9396ec9 Reduce memory usage
* Reduce size of RopeString
* Use fit memory if possible for ArrayObject fastModeData
* Re-implement ByteCode pruning logic
* Re-implement inline-cache for reducing memory usage
* Remove std::vector with gc_allocator. it can cause memory leak

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2019-12-18 11:11:26 +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/삼성전자
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/삼성전자
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/삼성전자
e93e0bf44b Implement String::toNonGCUTF8StringData (#33)
This improves performance of StringRef::toStdUTF8String() in api layer.
until now, StringRef::toStdUTF8String uses String::toUTF8StringData
String::toUTF8StringData uses GC for allocate StringData
but we don't needs using GC so I changed it for peroformance.
It was take 40~50% times to display Wiki site with StarFish.
after change it, It takes 0~1% times.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-12-12 16:15:40 +09:00
seonghyun kim
750ba31982 1. reduce memory usage of CallNativeFunction, CallBoundFunction
2. optimize StringBuilder

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-14 20:35:14 +09:00
seonghyun kim
c4bc84def6 1. optimize esprima_cpp
2. update android bdwgc build flags

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-12 21:28:01 +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
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
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
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
Junyoung Cho
880c068122 Recover m_contentLength in RopeString
- avoid performance loss in ChakraCore String test
(Strings/concat_empty.js)
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
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
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
96293e2716 wip
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-12 22:15:52 +09:00
seonghyun kim
109be415d1 1. remove Increment, Decrement opcode
2. implement fast String buffer access
3. remove hash from AtomicStringMap
4. implement simple dtoa cache

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-12 21:30:26 +09:00
seonghyun kim
0cf1532392 optimize SmallValue <-> Value
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-12 16:05:07 +09:00
seonghyun kim
94f79a2c42 1. improve trace stack
2. remove Load,Store GlobalName

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-16 19:40:11 +09:00
Junyoung Cho
eff931b702 Fix bugs: updating hasASCIIContent in RopeString, using subString in concat 2016-12-15 18:55:47 +09:00
seonghyun kim
c95e2ee004 implement String.prototype.indexOf
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-13 13:54:43 +09:00
Junyoung Cho
f7a22f54fc Apply clang-formatting 2016-12-08 14:53:01 +09:00
seonghyun kim
ef2987e8b4 1. implement binary operations (+, -, *...)
2. implement assigment complex cases( +=, -=...)
3. implement update expressions (++, --)
4. implement if, for statement
5. implement RopeString
6. implement throw statement

this patch passes bitops-bitwise-and.js, bitops-3bit-bits-in-byte.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-05 21:49:42 +09:00