Commit graph

143 commits

Author SHA1 Message Date
김승현/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/삼성전자
470d1374a8 Implement lazy LOC computing when got exception for performance (#88)
* update windows build stuffs

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-31 15:31:37 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
c34461310f make test262(ES5) runnable on Windows (#78)
* add icu as submodule
* Fix some wrong implemations
* Remove functions defined on ctypes.h. its implemations slightly different on POSIX and Windows.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-14 15:19:55 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
6b76791e32 Make compilable in clang (#71)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-05-04 16:44:19 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
68b8868018 Implement TemplateLiteralNode, TaggedTemplateExpressionNode (#65)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-04-23 14:30:05 +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)/Senior Engineer/삼성전자
a750632299 Bugfix exception handling (#47)
* credit to sh8281.kim

Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
2018-01-22 14:16:31 +09:00
김승현/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
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
28f6a51c31 Implement ES6+ String methods, Iterator, Map, Set Object (#43)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2018-01-15 19:58:01 +09:00
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자
cf31082836 virtual ID are should pretend to property of global object (#35)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-12-15 10:24:57 +09:00
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자
03b743d8fd 1. Implement stack property in ErrorObject (#5)
2. Fix new operation bug with bound function
3. Fix parameter copy bug

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-06-21 20:21:38 +09:00
seonghyun kim
dbc21192e3 implement Promise, gc, virtual property, virtual id things
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-25 13:15:38 +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
seonghyun kim
20790b0be1 add old legacy functions(__defineGetter__, __defineSetter__, __lookupGetter__, __lookupSetter)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-18 12:20:27 +09:00
seonghyun kim
40ef7b7a46 1. fix gc memory bug related with GetObjectPreComputedCase ByteCode
2. update chakracore data file
3. enable chakracore test in pipeline in gitlab

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-17 13:42:37 +09:00
seonghyun kim
19110310f0 1. update tools/vendortest/chakracore/chakracore.run.sh for right result
2. update chakracore xml files

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-16 22:17:54 +09:00
seonghyun kim
f234131c6c 1. use right receiver calling setter in GetObjectOperation
2. when evaluate evalLocal operation, flag of inside of with statment should propagate into inside CodeBlock due to using CallInWithOperation instead of CallOperation
3. restict using of RegisterCopySkip mode in CompoundAssigmentNodes
4. In with statement, every continue statement to outer statement is not allowed except label for literation

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-05-11 17:33:45 +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
5cefb08f12 1. If there is a deleted element in FastModeArray, it should not skip updating its enumeration data
2. If setObjectPreComputedCase decides to make no more caches because of many cacheMisses, it should invalidate previous caches

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-04-19 17:13:32 +09:00
seonghyun kim
a98bf4ec1b 1. add FUNCTION_OBJECT_BYTECODE_SIZE_MAX as config flag
2. divide CodeBlock into CodeBlock and InterpretedCodeBlock for saving memory
3. expand SCANNER_RESULT_POOL_INITIAL_SIZE to 128
4. connect String -> AtomicString with remaining space of String::m_tag
5. optimize Function.bind

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-04-14 13:20:08 +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
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
61f1065a7f 1. fix typo error in GlobalObject::eval
2. DeclarativeEnvironmentRecordNotIndexedForCatch for evalutate calling eval function in catch
3. evalutate computed flag of PropertyNode properly

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-31 12:58:37 +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
30489bbf09 1. revise builtinObject__proto__Setter to ignore undefined input
2. change order of evaluate ObjectPropertyDescriptor::ObjectPropertyDescriptor
3. give name to object getter, setter

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-30 14:20:58 +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
a904501b75 Combination of [try|catch|with] and controlflows works correctly
- add member m_outerLimitCount into class ControlFlowRecord to save tryStatementScopeCount of the jump destination

* fix bug in Array.prototype.concat()
 - It will check the length of the array overflows or not

* fix bug in setting __proto__
 - when setting __proto__ to non-object, non-null, non-undefined value, it should do nothing

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-28 18:25:45 +09:00
seonghyun kim
b160b0bcb0 implement initialize and mutable of identifier correctly
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-28 17:29:29 +09:00
seonghyun kim
34dad07c79 move VM-bound data into VMInstance from context
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-23 18:48:02 +09:00
seonghyun kim
6873cb9a75 1. remove wrong ASSERT macro in var declatiotor node
2. remove wrong method Object::get(state, name, receiver)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-23 14:28:41 +09:00
seonghyun kim
35ceec9680 1. not every binding is mutable in strict mode
- add m_isExplicitlyDeclaredOrParameterName into name info in ASTScopeContext
  - add m_isMutable into IdentifierRecord struct
  - add ThrowStaticExcpetion opcode in indexed-mode
  - add throw exception code in storeByName operation
2. when evaluate delete operation on member variable, must evaluate toString operation once for name even if exception throws
3. in strict mode, Decimals with leading zero literals are not allowed

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-22 22:33:34 +09:00
seonghyun kim
f51edbe5d9 1. initialize message variable of ErrorObject correctly
2. merge DeclareFunctionDeclaration, DeclareFunctionDeclarationsInGlobal into DeclareFunctionDeclarations
3. implement EnvironmentRecord::initializeBinding for initialize function decl.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-21 21:49:24 +09:00
seonghyun kim
d93ccc14fe 1. fix return operation bug in with statement
2. optimize JSON.parse function
3. exclude few useless vendor test cases

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-20 16:44:08 +09:00
seonghyun kim
738dd930b0 1. trait invalid LHS assigment correctly
2. implement ThrowStaticErrorOperation
3. optimize Get,SetObjectOpcode
4. optimize builtinArrayConstructor, Concat
5. implement SmallValue::fromValueForCtor it gives better performance when creating SmallValue from Value
6. add m_tag in String it gives the way to find typeof PointerValue without virtual function calling.
   we can remove this member variable when our project is ported into small device it has small memory

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-17 16:58:14 +09:00
seonghyun kim
b1cc608191 1. reduce size of ByteCodeBlock, CodeBlock classes
2. optimize function calling performance
 - change local variable binding order (this, function name first)
 - revise opcode table init method
3. remove OpcodeTable::m_reverseTable
4. use shared thrower JSGetterSetter instance for arguments, function object
5. revise Function.prototype.toString for to print function's source

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-15 22:19:13 +09:00
Junyoung Cho
f739987b49 1. Consider throw within catch clause
2. Fix small bugs in String.prototype.replace, %TypedArray%.prototype.set
update spidermonkey excludelist

Signed-off-by: Junyoung Cho <june0.cho@samsung.com>
2017-03-15 11:18:53 +09:00
Junyoung Cho
7c9240a1a7 1. For ES6 Array/Object pattern syntax, throw error instead of ASSERT crash.
2. Consider deleting arguments within 'with' scope.

Signed-off-by: Junyoung Cho <june0.cho@samsung.com>
2017-03-14 09:37:43 +09:00
seonghyun kim
013f0e5d16 1. re-implement arguments binding, CallBoundFunction logic for reduce interpreter loop size
2. optimize FunctionObject::call
3. remove ResetExecutionResult opcode
4. give stack limit of scriptParser correctly

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-13 19:23:12 +09:00
Junyoung Cho
e060ee1cef 1. [jetstream] Show geomean for each category
2. Consider __proto__ in Object Initializers(e.g. var a = {__proto__ : o}) and cyclic __proto__
3. Update sunspider script in gitlab-ci

Signed-off-by: Junyoung Cho <june0.cho@samsung.com>
2017-03-10 18:24:48 +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
f424467d65 1. do not modify spidermonkey.<arch>.org.text when testing
2. implement DeclareFunctionDeclarationsInGlobal, ReturnFunctionSlowCase
3. remove m_canUseDisalignedRegister in ByteCodeGenerator
4. remove ExectuionResult in ExecutionState
5. do multiple array initialization in ArrayDefineOwnPropertyOperation
6. revise FunctionObject::call, UpdateExpressions
7. fix wrong global codeBlock decision in GlobalObject::eval
8. arguments binding can be added in non-indexed mode

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-08 23:43:52 +09:00
seonghyun kim
44c0f3415d only ArrayObjects are checked length property when evaluate for..in
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-07 21:37:15 +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
Saebom Kim
8d030091c8 for ( .. in obj ) statement should work correctly if obj is changed in the body of the statement
Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
2017-03-07 12:16:58 +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
974e986e76 1. replace LoadByStackIndex, StoreByStackIndex with Move opcode
2. generate more optimized byte code in for, if, assignment, update AST node

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-03-02 21:34:57 +09:00
seonghyun kim
f27adc4dad 1. change order of register when generate expression byte code
2. optimize store stack variables

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
2017-02-24 17:15:04 +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