Commit graph

1,664 commits

Author SHA1 Message Date
Seonghyun Kim
5575cad622 wip
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-23 18:53:57 +09:00
Seonghyun Kim
c100122bf4 profile
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-20 13:53:52 +09:00
Seonghyun Kim
9e667ccdd2 Allow to save Int32 convertible double value as double in Value for performance
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-20 09:03:17 +09:00
Seonghyun Kim
3631ae6097 Update Value constructors
Improve Value::Value(double) performance.
Add missing double and int32 type testing on interpreter

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-20 09:03:17 +09:00
HyukWoo Park
ebd5a42641 Fix backtrace info within eval code
* collect backtrace info including eval codes

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-20 08:44:14 +09:00
Zoltan Herczeg
de7aae0eba Support WebSocket close
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-05-20 08:43:32 +09:00
HyukWoo Park
786cb68d27 Fix the type of prototype in Temporal
* prototype object of Temporal should be ordinary object
* fix the type of prototype as to PrototypeObject

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-11 15:59:43 +09:00
HyukWoo Park
8fa6031fec Add DerivedObject for sub classes of Object
* check index property set in DerivedObject::defineOwnProperty method only
* index property check is removed for normal Object because PrototypeObject would check it instead

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-11 15:59:43 +09:00
Gergo Csizi
1763b6f38d Add Temporal JavaScript feature
Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-05-06 19:58:51 +09:00
Seonghyun Kim
04eb482d1e Add Object::constructorName API
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 19:05:38 +09:00
Seonghyun Kim
3d7bbe9c6a Update function name & init member variables in debug mode
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 18:47:43 +09:00
Seonghyun Kim
4ed055e82c Add special method for add property in object what was not existent.
the new method not check the existent of proeprty.
it can used for builtin-functions

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 18:47:43 +09:00
Seonghyun Kim
64403a2ea2 Implement get fast source, flags proeprty for RegExpObject
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 18:47:43 +09:00
Seonghyun Kim
f61cf477f4 Improve yarr performance
* In interpreter we can use ByteTerm* instead of int for program counter
* Too big inline function is not good for performance
* considering utf-16 string is only needed for UChar not LChar

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-05-03 18:47:43 +09:00
Gergo Csizi
856a1e2045 Show information about new generated test262 excludelist
After update the excludelist with make_excludelist.py it doesn't gave
information about failing and new passing tests. This patch will fix this.

Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-04-29 17:03:03 +09:00
HyukWoo Park
0f034c7f0b Mark non-fast mode ArrayObject by existing fast-mode data
* set dummy element address to denote non-fast mode array
* represent non-fast mode array without creating ObjectRareData

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-25 10:47:32 +09:00
HyukWoo Park
d231bc0800 Rename tagging operations
* rename tagging operations to clearly recognize typeTag and tag (vtable address)
* add global tag values for ScriptSimpleFunctionObject

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-22 16:11:56 +09:00
HyukWoo Park
de11a8a032 Fix uninitialized address usage in StringBuilder
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-22 16:11:56 +09:00
Seonghyun Kim
4cec2cda5a Remove useless comment
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-22 16:11:23 +09:00
Seonghyun Kim
83e4254ed0 Fix bug in Vector
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-22 16:11:23 +09:00
Seonghyun Kim
8eb836f60d TypedArrayObject should have raw buffer directly.
For achieve it, I add BufferAddressObserverManager.

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-22 16:11:23 +09:00
Seonghyun Kim
71a6afeaae Improve accessing TypedArray Performance
Add Object::getIndexedPropertyValue method for achive that
the function removes redundant creation of ObjectGetResult.
And Improve TypedArray object reading performance through better implementation

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-22 16:11:23 +09:00
HyukWoo Park
467ca4708f Fix minor debugger error
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-20 17:18:47 +09:00
HyukWoo Park
48b59453c6 Handle getting of undefined value by simple literal loading
* undefined value is obtained through GlobalVariableGet bytecode
* convert this case into simple LoadLiteral bytecode

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-19 13:37:13 +09:00
HyukWoo Park
9f901623dd Enable first breakpoint for Script created by initializeFunctionScript
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-18 17:19:19 +09:00
HyukWoo Park
02aac43bcf Minor fix for debugger
* debugger always stops at the start of new Script execution
* BreakpointLocationsInfo is added to debugger when Escargot generates bytecode for execution only

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-18 17:19:19 +09:00
Seonghyun Kim
705b959d3f Remove useless ObjectRareData allocation in RegExpObject
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-18 17:15:36 +09:00
Seonghyun Kim
292ead9d73 Implement checking update ArrayObject while enumerate
We can find disappered index without using the flag

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-18 17:15:36 +09:00
Seonghyun Kim
ba7c596e59 Implement PrototypeObject
PrototypeObject always returns true in Object::isEverSetAsPrototypeObject.
thus it don't need another space for mark it was used for prototype object.
this object can reduce a lots allocation of ObjectRaraData

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-18 17:15:36 +09:00
HyukWoo Park
ab86e7137c Fix wrong node position in switch statement
* switch statement has the last location in switch block which incurs an index error in BreakPoint insertion
* fix switch statement to have the start position after switch keyword

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-18 17:13:58 +09:00
Zoltan Herczeg
03c8cf55e2 Fix tcp connection available check in the debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-04-14 16:38:11 +09:00
HyukWoo Park
a25c6fa5e8 Add a specific API to create a Script by wrapping the source code with an anonymous function
* `initializeFunctionScript` API is added
* unlike dynamically created function, `initializeFunctionScript` supports debugger
* origin line offset is added for correct source code calculation in debugger

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-14 10:57:47 +09:00
HyukWoo Park
d3f6ef74f9 Add ErrorThrowCallback API
* ErrorThrowCallback is invoked when an Error is thrown
* ErrorThrowCallback overwrites the result of ErrorCreationCallback

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-13 15:22:59 +09:00
Zoltan Herczeg
49c40cd26e Implement object store in the debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-04-12 14:13:56 +09:00
Seonghyun Kim
35c6836f2e Divide get object inline cache into 2 case
Divice get object inline cache into simple and complex cases
the simple case should test just one object chain with plain data property
the complex case should consider every case of inline cache

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-12 12:01:08 +09:00
Seonghyun Kim
18707ead9e Store Value instead of dobule in NumberInEncodedValue.
store double can cause type test cost for `the double is Int32`
If store double valus as Value, the test cost disapper

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-12 11:35:25 +09:00
Seonghyun Kim
f4d0b2c940 Improve array get, set performance in interpreter
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-08 10:26:23 +09:00
Seonghyun Kim
9eab9b21f4 Cache data address of ArrayBuffer for improve performance
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-08 10:26:23 +09:00
HyukWoo Park
09c78e357d Fix a minor bug in DoubleInEncodedValue conversion
* DoubleInEncodedValue might have an integer value that is also not a small integer (SMI)
* When converting to Value, DoubleInEncodedValue should be correctly converted to the original value using Value(double) constructor
* fix test runner to run cctest for x86 environment

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-08 10:25:12 +09:00
HyukWoo Park
160c6b3183 Update fast construct method for ScriptSimpleFunctionObject
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-06 09:55:14 +09:00
HyukWoo Park
d0716850af Rename required register numbers for ByteCodeBlock
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-06 09:55:14 +09:00
HyukWoo Park
2593b3cabe Do not notify bytecode release for debugging-unmarked function
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-05 11:19:46 +09:00
Seonghyun Kim
45eaf29c4c Reimplement object set inline cache to store multiple item of inline cache
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-05 11:18:18 +09:00
Seonghyun Kim
e6ff2808c8 Fix get object inline cache bug
we must convert form of inline cache when find complex case(max index is greater than 1) of get object.

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-04-05 11:18:18 +09:00
Seonghyun Kim
635c609330 Refactor DoubleInEncodedValue
I store its tag information in the same location with PointerValues
It can reduce memory access count when finding type

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-03-31 14:30:42 +09:00
Zoltan Herczeg
21d0e6aa42 Implement scope chain property enumeration in the debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-03-28 17:15:34 +09:00
Seonghyun Kim
9be98a8082 Improve Value <-> EncodedValue conversion performance
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-03-28 14:39:52 +09:00
Seonghyun Kim
ebf4756480 Binding function object in interpreter and compute required stack size early
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-03-28 14:39:52 +09:00
Seonghyun Kim
b76294bcca Init local stack allocated var values in interpreter
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2022-03-28 14:39:52 +09:00
HyukWoo Park
a84b75d407 Update ErrorCreationCallback handling to ignore adding stackdata into stack property
* if ErrorCreationCallback is registered and this callback already inserts `stack` property for evert created ErrorObject,
  we just ignore adding `stack` data into ErrorObject

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-03-28 10:38:47 +09:00