Revert "LibJS: Get rid of unnecessary work from canonical_numeric_index_string"

This reverts commit 3a184f7841.

This broke a number of test262 tests under "TypedArrayConstructors".
The issue is that the CanonicalNumericIndexString AO should not fail
for inputs like "1.1", despite them not being integral indices.
This commit is contained in:
Andreas Kling 2022-02-13 15:35:15 +01:00
commit 4b412e8fee
Notes: sideshowbarker 2024-07-17 18:54:57 +09:00
9 changed files with 105 additions and 61 deletions

View file

@ -39,9 +39,8 @@ bool validate_and_apply_property_descriptor(Object*, PropertyKey const&, bool ex
ThrowCompletionOr<Object*> get_prototype_from_constructor(GlobalObject&, FunctionObject const& constructor, Object* (GlobalObject::*intrinsic_default_prototype)());
Object* create_unmapped_arguments_object(GlobalObject&, Span<Value> arguments);
Object* create_mapped_arguments_object(GlobalObject&, FunctionObject&, Vector<FunctionNode::Parameter> const&, Span<Value> arguments, Environment&);
Optional<u32> canonical_numeric_index_string(PropertyKey const&);
Value canonical_numeric_index_string(GlobalObject&, PropertyKey const&);
ThrowCompletionOr<String> get_substitution(GlobalObject&, Utf16View const& matched, Utf16View const& str, size_t position, Span<Value> captures, Value named_captures, Value replacement);
double string_to_number(const PrimitiveString&);
enum class CallerMode {
Strict,