9fe37d238e
This is a reland of d14ed12e56
with fix for test failures in lite mode.
When handling load named properties (without feedback vectors) we used
to miss to runtimes if the prototypes aren't set. This was because we
wanted to give the prototype a chance to become fast, since most prototypes
start in slow mode but move to fast after the initial setup. Though this
check is not really useful when we don't have feedback vectors, and once
feedback vectors are allocated we will turn the prototypes fast anyway.
Bug: v8:8394, v8:8860
Change-Id: I5c7b5061e1d9068c72d6f0eea47517880940a054
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1591772
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61267}
23 lines
502 B
JavaScript
23 lines
502 B
JavaScript
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
(function Test() {
|
|
var f = () => 42;
|
|
function modify_f() {
|
|
delete f.length;
|
|
delete f.name;
|
|
|
|
var g = Object.create(f);
|
|
for (var i = 0; i < 5; i++) {
|
|
g.dummy;
|
|
}
|
|
}
|
|
%EnsureFeedbackVectorForFunction(f);
|
|
assertTrue(%HasFastProperties(f));
|
|
|
|
var h = f.bind(this);
|
|
})();
|