Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,36 @@
// Copyright 2024 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
var p1 = {}
var p2 = {}
function foo() {}
var o1 = new foo();
// Pre-seed 3 maps where con is constant
o1.con = 1;
o1.__proto__ = p1;
o1.__proto__ = p2;
// The o.con store only clears constness of the middle map. Both
// proto transitions above and below do not propagate the constness
// change. Thus both loads at the bottom and top seem to be reading
// from the same constant field.
function t1(o) {
var a = o.con;
o.__proto__ = p1;
o.con = 2;
o.__proto__ = p2;
return a + o.con;
}
function t2() {
var o = new foo();
o.con = 1;
return t1(o);
}
%PrepareFunctionForOptimization(t1);
assertTrue(t2() == 3);
%OptimizeFunctionOnNextCall(t1);
assertTrue(t2() == 3);