Commit graph

42 commits

Author SHA1 Message Date
seonghyun kim
438cdfcb38 1. process \r\n pattern in ByteCodeBlock::computeNodeLOCFromByteCode correctly
2. use stackStorage for "arguments" object
3. do not insert empty name for ASTScopeContext when comes emptyString in FunctionExpression name

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-03 13:19:51 +09:00
seonghyun kim
30969cc0a3 1. track using identifier correctly in esprima
2. remove useless new operation
3. use Indexed storage for CodeBlock has arguments binding

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-02 12:17:04 +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
389e767ae8 use indexed load/store for catch block partially
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-23 13:50:48 +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
Eunji Jeong
16d30378c2 Enable make run-jsc-stress and improve some error messages 2017-01-17 23:17:00 +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
baeab5a6ac 1. optimze interpreter
2. optimze getThisBinding operation
3. optimze esprima::scanStringLiteral
4. optimze ObjectStructurePropertyDescriptor

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-11 12:39:06 +09:00
seonghyun kim
fefa16daaa 1. reduce default ast Node size
2. don't useless info in esprima
3. implement pool of ScannerResult in esprima
4. optimize SetGlobalObject, GetGlobalObject

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-01-10 19:46:46 +09:00
Eunji Jeong
b79536b9c9 Support full functionalities of Promise object 2017-01-05 13:28:07 +09:00
Eunji Jeong
027b7445a5 Modification according to our ecma spec version management policy
* Remove USE_ES6_FEATURE flag
  : Some comments added for this
* Add ESCARGOT_USE_PROMISE flag
  : More feature-wise flags (like ESCARGOT_USE_TYPEDARRAY) will be added
* Add test/test262-master submodule
  : Our goal includes both fully supporting es5 and following the latest spec
* Add some basic functionalities for implementing Promise object
2017-01-04 17:16:04 +09:00
Eunji Jeong
3aa287ee25 Pass tests in es5 test262 15.1 (except for URI-related features)
- Switch condition should not modify executionresult
- Parser context is not in iteration, nor in switch at first
- Builtin function length should be decided by parametersInfomation
- Implement Object.prototype.propertyIsEnumerable
2016-12-29 19:23:28 +09:00
Eunji Jeong
8274d29fb1 Initialize uninitialized variable 2016-12-29 18:07:57 +09:00
Eunji Jeong
6db46a1f27 Pass more tests in test262 ch12
- The values of [[Enumerable]] attributes are not considered when
determining if a property of a prototype object is shadowed by a
previous object on the prototype chain.
- Handle different object initializer syntax in ES5-ES6
- Parser should not be in function body at initialization
2016-12-28 16:15:53 +09:00
Eunji Jeong
e66d1e0b48 Add Function.prototype.call and handle cornercase in strict directive
14.1 A Use Strict Directive may not contain an EscapeSequence or
LineContinuation (14.1-5-s)
2016-12-28 13:36:35 +09:00
Junyoung Cho
c5aa986ae4 In parsing String Literal, expand Unplain case.
e.g. "\\nvar a=0;\\nvar b=0" should become a Literal "var a=0;var b=0"
2016-12-27 20:55:12 +09:00
seonghyun kim
5bca24da82 1. implement ObjectDefineOwnPropertyOperation
2. Add errorcode in ScriptError
3. Fix array length bug
4. Fix ObjectPropertyDescriptor::ObjectPropertyDescriptor(ExecutionState& state, Object* obj)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-23 22:21:22 +09:00
Junyoung Cho
0faef8219f - Apply strict within eval from outside strict context
- Fix octal bug in parser
2016-12-23 10:19:51 +09:00
Junyoung Cho
43103b8542 Fix esprima: consider char code 0 (\u0000, \x00, ...) 2016-12-22 16:14:08 +09:00
Junyoung Cho
a452dfb42c Fix \u, \x parsing bug 2016-12-22 15:24:21 +09:00
seonghyun kim
6b61998f69 1. implement Object.prototype.isPrototypeOf
2. fix esprima bug

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-22 15:12:38 +09:00
seonghyun kim
ce286180e7 implement parse use strict correctly
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-22 14:43:03 +09:00
seonghyun kim
f592b96cab implement object getter setter
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-21 15:51:38 +09:00
seonghyun kim
568825a04e implement with statement
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-20 16:26:17 +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
seonghyun kim
e1c48390a7 1. implement String, Number proxy object
2. optimze Script Parser(esprima)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-19 14:29:34 +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
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
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
seonghyun kim
ba6400045c implement basic of try-catch statement
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-13 13:23:14 +09:00
seonghyun kim
8acbfcfe52 1. split Vector into TightVector and Vector
2. implement basic of DateObject
3. implement continue statement

this patch passes 3d-raytrace.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-09 13:56:54 +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
4c519ff606 implement BasicString
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-01 18:06:28 +09:00
seonghyun kim
d587becaf3 1. implement indexed Storages for function
2. implement function call

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-12-01 14:43:06 +09:00
seonghyun kim
a545adebf5 implement declare var, Function Decl, Function Expression
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-30 19:01:37 +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
70f822134c implement part of esprima::Parser in c++
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-22 19:08:57 +09:00
seonghyun kim
f380ffce9b 1. add ast nodes
2. implement StringView
3. implement esprima::Scanner for script parsing
4. add original source of esprima 3.1.1

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2016-11-18 21:02:53 +09:00