Skip to content

Commit 0765ed3

Browse files
author
Bela Toth
committed
Implement TrimStart TrimEnd and aliases
Based on: https://tc39.es/ecma262/#sec-string.prototype.trim JerryScript-DCO-1.0-Signed-off-by: Bela Toth [email protected]
1 parent 0c15430 commit 0765ed3

File tree

9 files changed

+156
-64
lines changed

9 files changed

+156
-64
lines changed

jerry-core/ecma/base/ecma-helpers-string.c

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,49 +2426,80 @@ ecma_string_substr (const ecma_string_t *string_p, /**< pointer to an ecma strin
24262426
* Helper function for trimming.
24272427
*
24282428
* Used by:
2429-
* - ecma_string_trim
2430-
* - ecma_utf8_string_to_number
2431-
* - ecma_builtin_global_object_parse_int
2432-
* - ecma_builtin_global_object_parse_float
2429+
* - ecma_string_trim_helper
2430+
*
2431+
* @return position of the first non whitespace character.
24332432
*/
2434-
void
2435-
ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p, /**< [in, out] current string position */
2436-
lit_utf8_size_t *utf8_str_size) /**< [in, out] size of the given string */
2433+
const lit_utf8_byte_t *
2434+
ecma_string_trim_front (const lit_utf8_byte_t *start_p, /**< current string's start position */
2435+
const lit_utf8_byte_t *end_p) /**< size of the given string */
24372436
{
24382437
ecma_char_t ch;
2439-
lit_utf8_size_t read_size;
2440-
const lit_utf8_byte_t *nonws_start_p = *utf8_str_p + *utf8_str_size;
2441-
const lit_utf8_byte_t *current_p = *utf8_str_p;
24422438

2443-
while (current_p < nonws_start_p)
2439+
while (start_p < end_p)
24442440
{
2445-
read_size = lit_read_code_unit_from_utf8 (current_p, &ch);
2441+
lit_utf8_size_t read_size = lit_read_code_unit_from_utf8 (start_p, &ch);
24462442

24472443
if (!lit_char_is_white_space (ch))
24482444
{
2449-
nonws_start_p = current_p;
24502445
break;
24512446
}
2452-
2453-
current_p += read_size;
2447+
start_p += read_size;
24542448
}
24552449

2456-
current_p = *utf8_str_p + *utf8_str_size;
2450+
return start_p;
2451+
} /* ecma_string_trim_front */
2452+
2453+
/**
2454+
* Helper function for trimming.
2455+
*
2456+
* Used by:
2457+
* - ecma_string_trim_helper
2458+
*
2459+
* @return position of the last non whitespace character.
2460+
*/
2461+
const lit_utf8_byte_t *
2462+
ecma_string_trim_back (const lit_utf8_byte_t *start_p, /**< current string's start position */
2463+
const lit_utf8_byte_t *end_p) /**< size of the given string */
2464+
{
2465+
ecma_char_t ch;
24572466

2458-
while (current_p > nonws_start_p)
2467+
while (end_p > start_p)
24592468
{
2460-
read_size = lit_read_prev_code_unit_from_utf8 (current_p, &ch);
2469+
lit_utf8_size_t read_size = lit_read_prev_code_unit_from_utf8 (end_p, &ch);
24612470

24622471
if (!lit_char_is_white_space (ch))
24632472
{
24642473
break;
24652474
}
2466-
2467-
current_p -= read_size;
2475+
end_p -= read_size;
24682476
}
24692477

2470-
*utf8_str_p = nonws_start_p;
2471-
*utf8_str_size = (lit_utf8_size_t) (current_p - nonws_start_p);
2478+
return end_p;
2479+
} /* ecma_string_trim_back */
2480+
2481+
/**
2482+
* Helper function for trimming.
2483+
*
2484+
* Used by:
2485+
* - ecma_string_trim
2486+
* - ecma_utf8_string_to_number
2487+
* - ecma_builtin_global_object_parse_int
2488+
* - ecma_builtin_global_object_parse_float
2489+
*/
2490+
inline void JERRY_ATTR_ALWAYS_INLINE
2491+
ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p, /**< [in, out] current string position */
2492+
lit_utf8_size_t *utf8_str_size) /**< [in, out] size of the given string */
2493+
{
2494+
2495+
const lit_utf8_byte_t *end = *utf8_str_p + *utf8_str_size;
2496+
const lit_utf8_byte_t *start = *utf8_str_p;
2497+
2498+
const lit_utf8_byte_t *new_start_p = ecma_string_trim_front (start, end);
2499+
const lit_utf8_byte_t *new_end_p = ecma_string_trim_back (new_start_p, end);
2500+
2501+
*utf8_str_size = (lit_utf8_size_t) (new_end_p - new_start_p);
2502+
*utf8_str_p = new_start_p;
24722503
} /* ecma_string_trim_helper */
24732504

24742505
/**

jerry-core/ecma/base/ecma-helpers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,12 @@ lit_magic_string_id_t ecma_get_string_magic (const ecma_string_t *string_p);
397397

398398
lit_string_hash_t ecma_string_hash (const ecma_string_t *string_p);
399399
ecma_string_t *ecma_string_substr (const ecma_string_t *string_p, lit_utf8_size_t start_pos, lit_utf8_size_t end_pos);
400+
const lit_utf8_byte_t * ecma_string_trim_front (const lit_utf8_byte_t *start_p, const lit_utf8_byte_t *end_p);
401+
const lit_utf8_byte_t * ecma_string_trim_back (const lit_utf8_byte_t *start_p, const lit_utf8_byte_t *end_p);
400402
void ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p,
401403
lit_utf8_size_t *utf8_str_size);
402404
ecma_string_t *ecma_string_trim (const ecma_string_t *string_p);
405+
403406
#if ENABLED (JERRY_ESNEXT)
404407
ecma_value_t ecma_string_pad (ecma_value_t original_string_p,
405408
ecma_value_t max_length,

jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
#include "ecma-container-object.h"
1919
#include "ecma-array-object.h"
2020
#include "ecma-typedarray-object.h"
21+
#include "ecma-string-object.h"
2122
#include "ecma-gc.h"
23+
#include "ecma-helpers.h"
2224
#include "lit-char-helpers.h"
2325

2426
#if ENABLED (JERRY_ESNEXT)
@@ -44,7 +46,9 @@ enum
4446
ECMA_INTRINSIC_ARRAY_TO_STRING,
4547
ECMA_INTRINSIC_DATE_TO_UTC_STRING,
4648
ECMA_INTRINSIC_PARSE_FLOAT,
47-
ECMA_INTRINSIC_PARSE_INT
49+
ECMA_INTRINSIC_PARSE_INT,
50+
ECMA_INTRINSIC_STRING_TRIM_START,
51+
ECMA_INTRINSIC_STRING_TRIM_END,
4852
};
4953

5054
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-intrinsic.inc.h"
@@ -206,6 +210,47 @@ ecma_builtin_intrinsic_dispatch_routine (uint16_t builtin_routine_id, /**< built
206210

207211
return ecma_date_value_to_utc_string (*prim_value_p);
208212
}
213+
case ECMA_INTRINSIC_STRING_TRIM_START:
214+
case ECMA_INTRINSIC_STRING_TRIM_END:
215+
{
216+
ecma_value_t coercible = ecma_op_check_object_coercible (this_arg);
217+
218+
if (ECMA_IS_VALUE_ERROR (coercible))
219+
{
220+
return coercible;
221+
}
222+
223+
ecma_string_t *to_str_p = ecma_op_to_string (this_arg);
224+
if (to_str_p == NULL)
225+
{
226+
return ECMA_VALUE_ERROR;
227+
}
228+
229+
ECMA_STRING_TO_UTF8_STRING (to_str_p, start_p, input_start_size);
230+
231+
lit_utf8_size_t size;
232+
const lit_utf8_byte_t *input_start_p = start_p;
233+
const lit_utf8_byte_t *input_str_end_p = start_p + input_start_size;
234+
235+
ecma_string_t *ret_str_p;
236+
if (builtin_routine_id == ECMA_INTRINSIC_STRING_TRIM_START)
237+
{
238+
const lit_utf8_byte_t *new_start_p = ecma_string_trim_front (input_start_p, input_str_end_p);
239+
size = (lit_utf8_size_t) (input_str_end_p - new_start_p);
240+
ret_str_p = ecma_new_ecma_string_from_utf8 (new_start_p, size);
241+
}
242+
else
243+
{
244+
const lit_utf8_byte_t *new_end_p = ecma_string_trim_back (input_start_p, input_str_end_p);
245+
size = (lit_utf8_size_t) (new_end_p - input_start_p);
246+
ret_str_p = ecma_new_ecma_string_from_utf8 (input_start_p, size);
247+
}
248+
249+
ECMA_FINALIZE_UTF8_STRING (start_p, input_start_size);
250+
ecma_value_t result = ecma_make_string_value (ret_str_p);
251+
ecma_deref_ecma_string (to_str_p);
252+
return result;
253+
}
209254
default:
210255
{
211256
JERRY_ASSERT (builtin_routine_id == ECMA_INTRINSIC_PARSE_INT
@@ -236,7 +281,6 @@ ecma_builtin_intrinsic_dispatch_routine (uint16_t builtin_routine_id, /**< built
236281

237282
ECMA_FINALIZE_UTF8_STRING (string_buff, string_buff_size);
238283
ecma_deref_ecma_string (str_p);
239-
240284
return result;
241285
}
242286
}

jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.inc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ ROUTINE (LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES, ECMA_INTRINSIC_ARRAY_
7474
ROUTINE (LIT_INTERNAL_MAGIC_STRING_TYPEDARRAY_PROTOTYPE_VALUES, ECMA_INTRINSIC_TYPEDARRAY_PROTOTYPE_VALUES, 0, 0)
7575
ROUTINE (LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES, ECMA_INTRINSIC_SET_PROTOTYPE_VALUES, 0, 0)
7676
ROUTINE (LIT_INTERNAL_MAGIC_STRING_MAP_PROTOTYPE_ENTRIES, ECMA_INTRINSIC_MAP_PROTOTYPE_ENTRIES, 0, 0)
77+
ROUTINE (LIT_MAGIC_STRING_TRIM_START, ECMA_INTRINSIC_STRING_TRIM_START, 0, 0)
78+
ROUTINE (LIT_MAGIC_STRING_TRIM_END, ECMA_INTRINSIC_STRING_TRIM_END, 0, 0)
7779
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_INTRINSIC_ARRAY_TO_STRING, 0, 0)
7880
ROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_INTRINSIC_DATE_TO_UTC_STRING, 0, 0)
7981
ROUTINE (LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_INTRINSIC_PARSE_FLOAT, 1, 1)

jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ ROUTINE (LIT_MAGIC_STRING_CODE_POINT_AT, ECMA_STRING_PROTOTYPE_CODE_POINT_AT, 1,
7676
ROUTINE (LIT_MAGIC_STRING_PAD_START, ECMA_STRING_PROTOTYPE_PAD_START, 2, 1)
7777
ROUTINE (LIT_MAGIC_STRING_PAD_END, ECMA_STRING_PROTOTYPE_PAD_END, 2, 1)
7878
ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ECMA_STRING_PROTOTYPE_ITERATOR, 0, 0)
79+
80+
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_START, LIT_MAGIC_STRING_TRIM_START,
81+
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
82+
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_LEFT, LIT_MAGIC_STRING_TRIM_START,
83+
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
84+
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_END, LIT_MAGIC_STRING_TRIM_END,
85+
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
86+
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_RIGHT, LIT_MAGIC_STRING_TRIM_END,
87+
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
7988
#endif /* ENABLED (JERRY_ESNEXT) */
8089

8190
#endif /* ENABLED (JERRY_BUILTIN_STRING) */

jerry-core/lit/lit-magic-strings.inc.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPECIES, "species")
525525
#if ENABLED (JERRY_BUILTIN_NUMBER)
526526
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_FIXED_UL, "toFixed")
527527
#endif
528+
#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)
529+
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_END, "trimEnd")
530+
#endif
528531
#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT)
529532
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNICODE, "unicode")
530533
#endif
@@ -593,6 +596,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UINT8_UL, "setUint8")
593596
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SUBARRAY, "subarray")
594597
#endif
595598
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_STRING_UL, "toString")
599+
#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)
600+
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_LEFT, "trimLeft")
601+
#endif
596602
#if ENABLED (JERRY_BUILTIN_ANNEXB)
597603
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNESCAPE, "unescape")
598604
#endif
@@ -663,6 +669,10 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRINGIFY, "stringify")
663669
#if ENABLED (JERRY_BUILTIN_STRING)
664670
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SUBSTRING, "substring")
665671
#endif
672+
#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)
673+
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_RIGHT, "trimRight")
674+
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_START, "trimStart")
675+
#endif
666676
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNDEFINED, "undefined")
667677
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
668678
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INT16_ARRAY_UL, "Int16Array")

jerry-core/lit/lit-magic-strings.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ LIT_MAGIC_STRING_SET_INT8_UL = "setInt8"
204204
LIT_MAGIC_STRING_SET_YEAR_UL = "setYear"
205205
LIT_MAGIC_STRING_SPECIES = "species"
206206
LIT_MAGIC_STRING_TO_FIXED_UL = "toFixed"
207+
LIT_MAGIC_STRING_TRIM_END = "trimEnd"
207208
LIT_MAGIC_STRING_UNICODE = "unicode"
208209
LIT_MAGIC_STRING_UNSHIFT = "unshift"
209210
LIT_MAGIC_STRING_VALUE_OF_UL = "valueOf"
@@ -234,6 +235,7 @@ LIT_MAGIC_STRING_SET_MONTH_UL = "setMonth"
234235
LIT_MAGIC_STRING_SET_UINT8_UL = "setUint8"
235236
LIT_MAGIC_STRING_SUBARRAY = "subarray"
236237
LIT_MAGIC_STRING_TO_STRING_UL = "toString"
238+
LIT_MAGIC_STRING_TRIM_LEFT = "trimLeft"
237239
LIT_MAGIC_STRING_UNESCAPE = "unescape"
238240
LIT_MAGIC_STRING_WRITABLE = "writable"
239241
LIT_MAGIC_STRING_OBJECT_TO_STRING_UL = "[object "
@@ -265,6 +267,8 @@ LIT_MAGIC_STRING_STRINGIFY = "stringify"
265267
LIT_MAGIC_STRING_SET_UINT16_UL = "setUint16"
266268
LIT_MAGIC_STRING_SET_UINT32_UL = "setUint32"
267269
LIT_MAGIC_STRING_SUBSTRING = "substring"
270+
LIT_MAGIC_STRING_TRIM_RIGHT = "trimRight"
271+
LIT_MAGIC_STRING_TRIM_START = "trimStart"
268272
LIT_MAGIC_STRING_UNDEFINED = "undefined"
269273
LIT_MAGIC_STRING_INT16_ARRAY_UL = "Int16Array"
270274
LIT_MAGIC_STRING_INT32_ARRAY_UL = "Int32Array"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright JS Foundation and other contributors, http://js.foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
var test = " asd ";
16+
assert(test.trimStart() === "asd ")
17+
assert(test.trimStart().length === 5)
18+
assert(test.trimLeft() === "asd ")
19+
assert(test.trimLeft().length === 5)
20+
assert(String.prototype.trimStart === String.prototype.trimLeft)
21+
22+
assert(test.trimEnd() === " asd")
23+
assert(test.trimEnd().length === 5)
24+
assert(test.trimRight() === " asd")
25+
assert(test.trimRight().length === 5)
26+
assert(String.prototype.trimEnd === String.prototype.trimRight)
27+
28+
assert(test.trim() === "asd")
29+
assert(test.trim().length === 3)

tests/test262-esnext-excludelist.xml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,8 @@
9494
<test id="annexB/built-ins/String/prototype/sup/this-val-tostring-err.js"><reason></reason></test>
9595
<test id="annexB/built-ins/String/prototype/trimLeft/length.js"><reason></reason></test>
9696
<test id="annexB/built-ins/String/prototype/trimLeft/name.js"><reason></reason></test>
97-
<test id="annexB/built-ins/String/prototype/trimLeft/prop-desc.js"><reason></reason></test>
9897
<test id="annexB/built-ins/String/prototype/trimRight/length.js"><reason></reason></test>
9998
<test id="annexB/built-ins/String/prototype/trimRight/name.js"><reason></reason></test>
100-
<test id="annexB/built-ins/String/prototype/trimRight/prop-desc.js"><reason></reason></test>
10199
<test id="annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js"><reason></reason></test>
102100
<test id="annexB/built-ins/unescape/four-ignore-bad-u.js"><reason></reason></test>
103101
<test id="annexB/built-ins/unescape/four.js"><reason></reason></test>
@@ -1999,48 +1997,10 @@
19991997
<test id="built-ins/String/prototype/toString/non-generic-realm.js"><reason></reason></test>
20001998
<test id="built-ins/String/prototype/trimEnd/length.js"><reason></reason></test>
20011999
<test id="built-ins/String/prototype/trimEnd/name.js"><reason></reason></test>
2002-
<test id="built-ins/String/prototype/trimEnd/prop-desc.js"><reason></reason></test>
2003-
<test id="built-ins/String/prototype/trimEnd/this-value-boolean.js"><reason></reason></test>
2004-
<test id="built-ins/String/prototype/trimEnd/this-value-line-terminator.js"><reason></reason></test>
20052000
<test id="built-ins/String/prototype/trimEnd/this-value-not-obj-coercible.js"><reason></reason></test>
2006-
<test id="built-ins/String/prototype/trimEnd/this-value-number.js"><reason></reason></test>
2007-
<test id="built-ins/String/prototype/trimEnd/this-value-object-cannot-convert-to-primitive-err.js"><reason></reason></test>
2008-
<test id="built-ins/String/prototype/trimEnd/this-value-object-toprimitive-call-err.js"><reason></reason></test>
2009-
<test id="built-ins/String/prototype/trimEnd/this-value-object-toprimitive-meth-err.js"><reason></reason></test>
2010-
<test id="built-ins/String/prototype/trimEnd/this-value-object-toprimitive-meth-priority.js"><reason></reason></test>
2011-
<test id="built-ins/String/prototype/trimEnd/this-value-object-toprimitive-returns-object-err.js"><reason></reason></test>
2012-
<test id="built-ins/String/prototype/trimEnd/this-value-object-tostring-call-err.js"><reason></reason></test>
2013-
<test id="built-ins/String/prototype/trimEnd/this-value-object-tostring-meth-err.js"><reason></reason></test>
2014-
<test id="built-ins/String/prototype/trimEnd/this-value-object-tostring-meth-priority.js"><reason></reason></test>
2015-
<test id="built-ins/String/prototype/trimEnd/this-value-object-tostring-returns-object-err.js"><reason></reason></test>
2016-
<test id="built-ins/String/prototype/trimEnd/this-value-object-valueof-call-err.js"><reason></reason></test>
2017-
<test id="built-ins/String/prototype/trimEnd/this-value-object-valueof-meth-err.js"><reason></reason></test>
2018-
<test id="built-ins/String/prototype/trimEnd/this-value-object-valueof-meth-priority.js"><reason></reason></test>
2019-
<test id="built-ins/String/prototype/trimEnd/this-value-object-valueof-returns-object-err.js"><reason></reason></test>
2020-
<test id="built-ins/String/prototype/trimEnd/this-value-symbol-typeerror.js"><reason></reason></test>
2021-
<test id="built-ins/String/prototype/trimEnd/this-value-whitespace.js"><reason></reason></test>
20222001
<test id="built-ins/String/prototype/trimStart/length.js"><reason></reason></test>
20232002
<test id="built-ins/String/prototype/trimStart/name.js"><reason></reason></test>
2024-
<test id="built-ins/String/prototype/trimStart/prop-desc.js"><reason></reason></test>
2025-
<test id="built-ins/String/prototype/trimStart/this-value-boolean.js"><reason></reason></test>
2026-
<test id="built-ins/String/prototype/trimStart/this-value-line-terminator.js"><reason></reason></test>
20272003
<test id="built-ins/String/prototype/trimStart/this-value-not-obj-coercible.js"><reason></reason></test>
2028-
<test id="built-ins/String/prototype/trimStart/this-value-number.js"><reason></reason></test>
2029-
<test id="built-ins/String/prototype/trimStart/this-value-object-cannot-convert-to-primitive-err.js"><reason></reason></test>
2030-
<test id="built-ins/String/prototype/trimStart/this-value-object-toprimitive-call-err.js"><reason></reason></test>
2031-
<test id="built-ins/String/prototype/trimStart/this-value-object-toprimitive-meth-err.js"><reason></reason></test>
2032-
<test id="built-ins/String/prototype/trimStart/this-value-object-toprimitive-meth-priority.js"><reason></reason></test>
2033-
<test id="built-ins/String/prototype/trimStart/this-value-object-toprimitive-returns-object-err.js"><reason></reason></test>
2034-
<test id="built-ins/String/prototype/trimStart/this-value-object-tostring-call-err.js"><reason></reason></test>
2035-
<test id="built-ins/String/prototype/trimStart/this-value-object-tostring-meth-err.js"><reason></reason></test>
2036-
<test id="built-ins/String/prototype/trimStart/this-value-object-tostring-meth-priority.js"><reason></reason></test>
2037-
<test id="built-ins/String/prototype/trimStart/this-value-object-tostring-returns-object-err.js"><reason></reason></test>
2038-
<test id="built-ins/String/prototype/trimStart/this-value-object-valueof-call-err.js"><reason></reason></test>
2039-
<test id="built-ins/String/prototype/trimStart/this-value-object-valueof-meth-err.js"><reason></reason></test>
2040-
<test id="built-ins/String/prototype/trimStart/this-value-object-valueof-meth-priority.js"><reason></reason></test>
2041-
<test id="built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js"><reason></reason></test>
2042-
<test id="built-ins/String/prototype/trimStart/this-value-symbol-typeerror.js"><reason></reason></test>
2043-
<test id="built-ins/String/prototype/trimStart/this-value-whitespace.js"><reason></reason></test>
20442004
<test id="built-ins/String/prototype/valueOf/non-generic-realm.js"><reason></reason></test>
20452005
<test id="built-ins/String/symbol-string-coercion.js"><reason></reason></test>
20462006
<test id="built-ins/Symbol/asyncIterator/cross-realm.js"><reason></reason></test>

0 commit comments

Comments
 (0)