Commit graph

30 commits

Author SHA1 Message Date
Sanggyu Lee
834696d331 Add evaluateScript and EscargotAPICast.h
- Also renamed shell.cpp to Shell.cpp.
- Next, I will add StringRef APIs and expose ScriptSandboxExecuteResult
and add testcase for evaluateScript.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
2017-03-09 13:58:31 +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
Youngil Choi
38dbe94d8d 1. use snprintf for string
2. use ESCARGOT_LOG_INFO, ESCARGOT_LOG_ERROR
2017-02-22 19:28:26 +09:00
seonghyun kim
e362acb82d 1. store thisValue in stackStorage instead of ExecutionState
2. remove GetThis byte code
3. optimize Function::call
4. optimize {get, set} of TypedArrayObject

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-14 18:32:15 +09:00
seonghyun kim
272c675e2e 1. sperate ByteCodeBlock::computeNodeLOCFromByteCode
2. implement selective clearing Stack
- only blockes have object, array, new expression are cleared by ClearStack function now
3. improve get object inline cache
4. remove CodeBlock::hasNonConfiguableNameOnGlobal
5. add thisValue in ExecutionState
6. optimize Value::abstractEqualsToSlowCase

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-13 10:36:25 +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
Eunji Jeong
8349be1512 Modify spidermonkey test and more
- Add ESCARGOT_ENABLE_VENDORTEST flag
- Remove some unnecessary lines in .gitlab-ci.yml
- Use architecture-wise output.txt file for spidermonkey
2017-01-26 16:15:02 +09:00
Eunji Jeong
b3ff7a3a7d Clear stack before executing interpreter loop to reduce leak from stack 2017-01-25 13:21:26 +09:00
Eunji Jeong
3cac1b803b Add ecma_6 into spidermonkey vendortest
* Copy more files from es1 to run spidermonkey tests
* Add tools to run ECMA5-incompatible tests
  - [babel](https://babeljs.io/)
  - [es6-shim](https://github.com/paulmillr/es6-shim)
  - [es6-symbol](https://www.npmjs.com/package/es6-symbol)
* Add src/shell/GlobalObjectBuiltinTestFunctions.cpp to add test-only functions
* 'of' should be able to be used as identifier
* Set rpath of x86 binary relative to binary path
* Remove config.h.in~ file from repository
* Fix broken build by removing third_party/libunwind
2017-01-25 13:08:19 +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
Eunji Jeong
e8689eed07 Enable make run-spidermonkey 2017-01-17 23:40:40 +09:00
Eunji Jeong
16d30378c2 Enable make run-jsc-stress and improve some error messages 2017-01-17 23:17:00 +09:00
Eunji Jeong
520a56ffdb Add "-e" shell option to evaluate string argument directly 2017-01-17 16:37:42 +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
Eunji Jeong
b79536b9c9 Support full functionalities of Promise object 2017-01-05 13:28:07 +09:00
Eunji Jeong
9c0d2a12b1 Exception name binding of catch clause cannot be deleted 2016-12-29 16:24:18 +09:00
Eunji Jeong
ade3b949ae Fix bug in array object iteration in debug mode 2016-12-21 14:36:25 +09:00
Junyoung Cho
2e5f2e7c73 Implement Boolean constructor
Set return value of main function to support test262
2016-12-20 19:04:18 +09:00
Junyoung Cho
b2ea88b251 -Implement Object.create.
-Move toString for shell result into sandbox to resolve throw exception.
2016-12-20 12:51:20 +09:00
Eunji Jeong
1a56fe4e48 Add custom allocator for precise marking and add more tools
* CustomAllocator : Supports precise marking for specified objects.
                    (also supports iteration of specific typed objects)
* HeapVisualizer : Track and visualize heap usage info.
* GCLeakChecker : Shows where the false reference came from.
                  (Developer should specify the location of false reference)
* Add support for incremental build of bdwgc
2016-12-20 11:14:07 +09:00
Eunji Jeong
8afb3c7fa4 Enhance some of GC features
* Add a heuristic to run GC before heap block allocation
  (to reduce fragmentation overhead)
* Add logger & visualizer of runtime heap usage
  (available both in debug/release mode)
2016-12-16 11:20:14 +09:00
seonghyun kim
35142d1c6a implement eval
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-12 14:34:31 +09:00
seonghyun kim
efb82ad9b5 1. implement ArrayObject
2. implement UnaryNot, Math.sqrt, break statement
3. add make tidy
this patch pass bitops-nsieve-bits.js, access-fannkuch.js, access-nbody.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-08 17:25:48 +09:00
Junyoung Cho
f7a22f54fc Apply clang-formatting 2016-12-08 14:53:01 +09:00
seonghyun kim
288b147659 1. implement tracing stack when got exception
2. binding function name
3. implement sandbox for isolate throw exception
4. implement object expression
5. implement get, set object operation
6. implement logical and, or operation

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-06 22:22:04 +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
seonghyun kim
7c47c6ed51 1. implement simple ByteCode (load, store, binary plus)
2. implement simple ByteCodeInterpreter
3. implement simple global env

we can run very simple script likes below now
a = b = 1;
b = a + 2;

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-29 22:40:21 +09:00
seonghyun kim
9cff64f7a6 implement generate CodeBlock tree in ScriptParser
you can see dump of CodeBlock tree with DUMP_CODEBLOCK_TREE=1 option(setenv)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-23 22:00:38 +09:00
seonghyun kim
d7f0b93dcf 1. implement SmallValue
2. implement AtomicString
3. implement StaticStrings
4. implement ExectionState

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-18 11:46:21 +09:00
seonghyun kim
485fbc25af initial commit
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-17 22:19:49 +09:00