ladybird/Libraries/LibJS/Tests
Aliaksandr Kalenik bd6750aaa5 LibJS: Skip prototype chain lookup in internal_set() for arrays
...when Array.prototype and Object.prototype are intact.

If `internal_set()` is called on an array exotic object with a numeric
PropertyKey, and:
- the prototype chain has not been modified (i.e., there are no getters
  or setters for indexed properties), and
- the array is not the target of a Proxy object,

then we can directly store the value in the receiver's indexed
properties, without checking whether it already exists somewhere in the
prototype chain.

1.7x improvement on the following program:
```js
function f() {
    let a = [];
    let i = 0;
    while (i < 10_000_000) {
        a.push(i);
        i++;
    }
}

f();
```
2025-05-23 14:51:32 +02:00
..
builtins LibJS: Skip prototype chain lookup in internal_set() for arrays 2025-05-23 14:51:32 +02:00
classes LibJS: Set empty function parameters on ClassStaticInit scope 2025-04-05 18:20:36 +01:00
functions Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
iterators Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
loops Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
math Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
modules LibJS: Remove support for the "assert" keyword for import attributes 2025-01-21 14:58:32 +01:00
operators LibJS: Return the allocated dst register from deleting super properties 2024-12-14 12:08:50 -08:00
regress LibJS: Skip caching get_by_id() if object's shape is changed by a getter 2025-05-20 19:10:56 -04:00
syntax LibJS: Allow division after IdentifierNames in optional chain 2024-11-11 20:19:26 +01:00
add-values-to-primitive.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
arguments-callee.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
arguments-object.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
assignment-evaluation-order.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
async-this-value.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
automatic-semicolon-insertion.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
break-continue-syntax-errors.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
comments-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
computed-property-sideeffects.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
computed-property-throws.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
const-declaration-missing-initializer.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
const-reassignment.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
copy-this-to-local.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
custom-@@hasInstance.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
custom-@@toPrimitive.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
custom-@@toStringTag.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
debugger-statement.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
duplicated-variable-declarations.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
empty-statements.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
eval-aliasing.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
eval-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
eval-redeclaration.js LibJS: Remove [[VarNames]] from GlobalEnvironment 2025-04-29 07:33:08 -04:00
exception-in-catch-block.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
exception-ReferenceError.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
exponentiation-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
for-loop-per-iteration-env-bug.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
gc-deeply-nested-object-graph.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
global-var-let-const.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
if-statement-function-declaration.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
indexed-access-prototype-indirection.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
indexed-access-string-object.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
inline-cache-edge-cases.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
invalid-lhs-in-assignment.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
labels.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
let-scoping.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
new-expression.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
non-writable-assignment.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
null-or-undefined-access.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
numeric-literals-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
object-basic.js LibJS: Allow async functions named "async" as function properties 2024-12-26 17:23:10 +01:00
object-expression-__proto__.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
object-expression-computed-property.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
object-expression-numeric-property.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
object-getter-setter-shorthand.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
object-method-shorthand.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
object-spread.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ordinary-to-primitive.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
parseInt.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
parser-declaration-in-single-statement-context.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
parser-invalid-destructuring-assignment-target.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
parser-line-terminators.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
parser-unary-associativity.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
permanently-screwed-by-eval.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
postfix-increment-eval-order.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
program-non-strict.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
program-strict-mode.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
redefine-next-in-builtin-iterators.js LibJS: Disable optimization in IteratorNextUnpack if next() is redefined 2025-05-12 07:41:29 -04:00
return.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
runtime-error-call-stack-size.js LibJS: Handle call stack limit exceptions in NewPromiseReactionJob 2025-02-05 08:05:01 -05:00
statement-with-many-labels.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
strict-mode-blocks.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
strict-mode-errors.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
string-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
string-concatenation.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
string-escapes.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
string-spread.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
switch-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
switch-break.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
switch-default-before-case.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
tagged-template-literals.js LibJS: Use correct this value for tagged template literals with members 2025-01-17 17:15:12 +01:00
template-literals.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
test-common-tests.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
test-common.js LibJS: Close sync iterator when async wrapper yields rejection 2025-04-29 07:33:08 -04:00
this-value-strict.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
this-value.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
throw-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
to-number-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
to-number-exception.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
try-catch-finally-nested.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
try-catch-finally-return.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
try-catch-finally.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
try-finally-break.js LibJS: Avoid emptying the return value register in try/finally 2025-03-27 12:18:30 +00:00
try-finally-continue.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
try-return-finally.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
unicode-identifier-escape.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
update-expression-on-member-expression.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
update-expressions-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
use-strict-directive.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
using-declaration.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
using-for-loops.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
var-multiple-declarator.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
var-scoping.js LibJS: Propagate direct eval presence if the current scope is screwed 2025-01-17 14:36:03 +01:00
variable-undefined.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
with-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00