forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original commit message: Merged: Squashed multiple commits. Merged: [const-tracking] Mark const field as mutable when reconfiguring Revision: 7535b91f7cb22274de734d5da7d0324d8653d626 Merged: [const-tracking] Fix incorrect DCHECK in MapUpdater Revision: f95db8916a731e6e5ccc0282616bc907ce06012f BUG=chromium:1161847,chromium:1185463,v8:9233 NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true R=[email protected] (cherry picked from commit 56518020bff4d0e8b82cff843c9f618c90084e42) Change-Id: I7f46a701646e1dd67a049b2aa4ac32d05b6885f3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2748079 Commit-Queue: Georg Neis <[email protected]> Reviewed-by: Igor Sheludko <[email protected]> Cr-Original-Commit-Position: refs/branch-heads/8.9@{nodejs#43} Cr-Original-Branched-From: 16b9bbbd581c25391981aa03180b76aa60463a3e-refs/heads/8.9.255@{#1} Cr-Original-Branched-From: d16a2a688498bd1c3e6a49edb25d8c4ca56232dc-refs/heads/master@{#72039} Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2794428 Reviewed-by: Victor-Gabriel Savu <[email protected]> Commit-Queue: Artem Sumaneev <[email protected]> Cr-Commit-Position: refs/branch-heads/8.6@{nodejs#73} Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1} Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472} Refs: v8/v8@ffde6ee
- Loading branch information
Showing
5 changed files
with
108 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2021 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 foo(first_run) { | ||
let o = { x: 0 }; | ||
if (first_run) assertTrue(%HasOwnConstDataProperty(o, 'x')); | ||
Object.defineProperty(o, 'x', { writable: false }); | ||
delete o.x; | ||
o.x = 23; | ||
if (first_run) assertFalse(%HasOwnConstDataProperty(o, 'x')); | ||
} | ||
%PrepareFunctionForOptimization(foo); | ||
foo(true); | ||
foo(false); | ||
%OptimizeFunctionOnNextCall(foo); | ||
foo(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2021 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 foo(first_run) { | ||
let o = { x: 0 }; | ||
if (first_run) assertTrue(%HasOwnConstDataProperty(o, 'x')); | ||
Object.defineProperty(o, 'x', { get() { return 1; }, configurable: true, enumerable: true }); | ||
delete o.x; | ||
o.x = 23; | ||
if (first_run) assertFalse(%HasOwnConstDataProperty(o, 'x')); | ||
} | ||
%PrepareFunctionForOptimization(foo); | ||
foo(true); | ||
foo(false); | ||
%OptimizeFunctionOnNextCall(foo); | ||
foo(false); |