Commit graph

1,135 commits

Author SHA1 Message Date
HyukWoo Park
bdd03a27c2 Fix memory tracing error in AsyncGeneratorObject v3.0.0
* fix to trace ExecutionPauser and AsyncGeneratorQueue vector members correctly

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-06-04 17:13:00 +09:00
Seonghyun Kim
6bfa3f9fff Apply lazy StaticString on builtin Intl
* Implement FromExternalMemory version of AtomicString

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-04 17:12:07 +09:00
Seonghyun Kim
5b3f0986b1 Implement lazy part of StaticString
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-04 17:12:07 +09:00
bence gabor kis
be3abac7e3 Remove infinity loop in regexp replace and match
if we use a regexp that contains Unicode and Global flag
and we match a string that contains more then one of the same letter
then the last index is going to be set wrongfully

for example :

var a = /t/ug;
print("ttt".match(a))

output should be: t,t,t

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-06-04 14:47:14 +09:00
HyukWoo Park
e3de031d7f Use macro for GlobalObject builtins
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-06-02 14:32:00 +09:00
Seonghyun Kim
389c6d8532 Annex B defines an early error for duplicate PropertyName of __proto__, in object initializers,
but this does not apply to Object Assignment patterns

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-01 14:17:29 +09:00
Seonghyun Kim
39e10484d7 When parsing TemplateLiteral in TaggedTemplateExpression, we should not throw SyntaxError.
* Set value as undefined when there is SyntaxError
* Fix memory leak related with throwing esprima::Error

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-06-01 14:17:29 +09:00
HyukWoo Park
4fb663ea0e Revise TypedArray definition
* update definition of ArrayBufferView, TypedArrayObject
* access each TypedArray through TypedArrayObject transition instead of ArrayBufferView

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-06-01 11:17:36 +09:00
bence gabor kis
26b974addc Adding ExecutionState depth to backtrace info
The new member is needed to Escargot debugger backtrace function

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-28 17:59:20 +09:00
Robert Fancsik
c85ec4f4a9 Statements LOC info should not be modified when the debugger is enabled
The line info for each breakpoint can be calculated from the LOC index.
This patch resolves the problem, mentioned in #649.

Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2020-05-27 17:43:00 +09:00
Seonghyun Kim
4f3774be0c Implement tagged-template cache on CodeBlock according to GetTemplateObject(templateLiteral) on spec
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-27 17:09:09 +09:00
Seonghyun Kim
fe0c65118c * When evaluate super.foo = 1 we should throw TypeError.
when PutValue is failed + isStrict('use strict` or class method).

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-27 17:09:09 +09:00
bence gabor kis
2784bab7e8 Added dummy get last index in Exec
The realted test262 test-cases has been removed from skip list

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-27 16:54:18 +09:00
HyukWoo Park
232618d09d Add Set/Map iterator API
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-27 12:35:19 +09:00
Seonghyun Kim
c9e4d5c6fd Implement more things about module
* Implement export * as {name} from {src} feature
* Update Script::resolveExport for following new spec
* Update test262 driver for running test cases correctly
* Implement changes of ModuleNamespaceObject::[[*]]

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-26 12:54:45 +09:00
Seonghyun Kim
ee97ae6412 Fix module bugs
* Export default function declaration should treat as function declaration
* But there is no name on export function decl, we should the statement as function expression
* Check duplicate export name correctly
* Don't include FIXTURE files as testset in test262

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-26 12:54:45 +09:00
HyukWoo Park
912bc2d9ef Improve TypedArray performance
* add element get/set internal method to TypedArray
* internal methods of TypedArray directly access array buffer
* disable inline cache only when property name is related to "Infinity"

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-25 16:17:53 +09:00
Seonghyun Kim
9b9f980cfe Reimplement initialize & executing Module according to newer spec
* Update test runner for running module tests in test262

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-22 18:34:57 +09:00
Seonghyun Kim
f50838bb5b Fix yield * expression bug
When there is no "throw" method when got exception while executing yield* expression,
We should throw "yield* violation. There is no throw method on iterator Object" TypeError.

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-22 18:34:57 +09:00
bence gabor kis
a88023c9c2 Debugger pending breakpoints
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-22 11:14:33 +09:00
bence gabor kis
88d055ebeb Minor Fix in RegExpObject escapeSlash
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-22 10:43:11 +09:00
HyukWoo Park
d1c6759483 Re-balance test list in Jenkins
* run jetstream only for release-32bit
* run test262 by release mode in 64bit
* for test262, add --fast-mode to run the TCs fastly in debug mode
* fix minor bug about type transition

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-22 10:27:45 +09:00
Bela Toth
e08c302ee5 Fix JSON.stringify property order
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2020-05-20 15:25:27 +09:00
HyukWoo Park
b977ab7e54 Rework internal methods of TypedArray
* implement and apply CanonicalNumericIndexString for index calculating
* use size_t type for index variables instead of unsigned
* skip a non-standard TC in SpiderMonkey test

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-19 15:21:02 +09:00
Seonghyun Kim
323c2dca20 Each function parameter should have own declarative environment.
but I don't want to add extra bytecodes for this.
and It is only needed when there is direct eval operation.
so I wrap each parameter block with small arrow function.

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-18 15:18:10 +09:00
Seonghyun Kim
355d7244f1 Fix minor issues
* When there is arrow function on class ctor, we should use heap-allocated lex env for class ctor.
  because we need to compute this variable on run-time
* when there is super expression with computed case, we should load this binding first for testing binding

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-18 15:18:10 +09:00
HyukWoo Park
8bba87833a Add TypedArrayHelper to represent common TypedArray features
* update ArrayBuffer using TypedArrayHelper
* fix a bug related to length of ArrayBuffer on 32bit

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-18 14:57:14 +09:00
HyukWoo Park
40574864d3 Update builtin methods of TypedArray based on ES10 (Part 2)
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-18 14:57:14 +09:00
bence gabor kis
b96d9c7a98 Minor fix - in Native errors
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-15 17:52:53 +09:00
Seonghyun Kim
6dec50591f We should create binding even there is virtual ID when executing Script
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-15 17:01:55 +09:00
Seungsoo Lee
c8e081d267 Fix an overflow bug
Change buffer size to PATH_MAX + 1

Signed-off-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
2020-05-13 14:37:38 +09:00
HyukWoo Park
bfcc61254d Update builtin methods of TypedArray based on ES10 (Part 1)
* ArrayBufferObject methods are updated
* some part of builtin methods in TypedArray reworked based on ES10

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-13 10:49:55 +09:00
HyukWoo Park
99d8acbe19 Update builtin methods of ArrayBuffer based on ES10
* separate definitions of ArrayBuffer methods into GlobalObjectBuiltinArrayBuffer.cpp

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-13 10:49:55 +09:00
bence gabor kis
e52c7d1b00 Debugger source send by client feature
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-12 16:57:32 +09:00
Seonghyun Kim
a9a41ff5f0 Implement missing part of GlobalDeclarationInstantiation and EvalDeclarationInstantiation
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-11 16:51:29 +09:00
Seonghyun Kim
3916dad5fc Fix minor things
* Object.prototype.toLocaleString should use this value correctly
* ICU 67 doesn't format near minus zero value correctly, so we should disable test
* we should provide stack info correctly when there is try-statemenet

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-11 16:51:29 +09:00
Seonghyun Kim
a58a01e02f Implement Intl.RelativeTimeFormat
* Each Context should share supported intl locale array

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-08 18:04:38 +09:00
HyukWoo Park
3520529a50 Fix minor defects
* remove obsolete return statements
* add guard code in parseClassElement

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-08 16:09:45 +09:00
HyukWoo Park
94609f3a1a Refactoring ObjectPropertyName structure
* compress the size of ObjectPropertyName to 4byte for 32bit platform
* use tag bit to represent the type of ObjectPropertyName

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-08 16:08:49 +09:00
HyukWoo Park
26b8593620 Add hasRareData for Object
* hasRareData is added to reduce repetitive check executions
* rename ensureRareData

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-08 16:08:38 +09:00
Achie
928181bc4f Fix Strict-NonSimple parameter rules within functions
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2020-05-07 10:11:56 +09:00
Bela
66d95455d7 Fix typo in kangax runner python file
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2020-05-06 11:30:56 +09:00
Seonghyun Kim
a7e53a4524 Fixup minor things
* If we use Object::nextIndexBackward, Object::nextIndexForward with non ordinal object,
  we should not test existence of value for index(we would not call user-defined function)
* Generate more user-friendly callstack

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-05-06 11:27:31 +09:00
HyukWoo Park
3d08d78cd1 Fix ArrayBuffer allocation
* toString builtin method of TypedArray is initialized to the value of Array.prototype.toString
* allocateArrayBuffer and cloneArrayBuffer are revised according to ES10 standard

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-05-04 12:10:44 +09:00
HyukWoo Park
c46957de8c Update length-related operations
* remove each unnecessary length method
* getArrayLength and lengthES6 have been renamed
* return type of toLength is changed to uint64_t
* use createListFromArrayLike for more cases

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-04-28 14:48:15 +09:00
Seonghyun Kim
f37bd559bb Implement Unified Intl.NumberFormat
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-04-28 14:47:41 +09:00
Seonghyun Kim
54df9e1f2e Fix Intl::isStructurallyValidLanguageTagAndCanonicalizeLanguageTag function
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-04-28 14:47:41 +09:00
Seonghyun Kim
d1f3979123 Revise Intl.DateTimeFormat
* Add hourCycle option into IntlDateTimeFormat
* Fix many minor bugs in IntlDateTimeFormat

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-04-28 14:47:41 +09:00
HyukWoo Park
749b1b20c8 Refactoring TypedArray definition
* fix a bug about TypedArray constructor too

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2020-04-27 15:20:45 +09:00
Seonghyun Kim
35653123c2 Implement Intl DateTimeFormat.prototype.formatToParts
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-04-23 11:41:05 +09:00