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,33 @@
// Copyright 2014 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.
'use strict';
var DefaultConstructorBenchmark = new BenchmarkSuite('DefaultConstructor',
[100], [
new Benchmark('NoSuperClass', false, false, 0, NoSuperClass),
new Benchmark('WithSuperClass', false, false, 0, WithSuperClass),
new Benchmark('WithSuperClassArguments', false, false, 0,
WithSuperClassArguments),
]);
class BaseClass {}
class DerivedClass extends BaseClass {}
function NoSuperClass() {
return new BaseClass();
}
function WithSuperClass() {
return new DerivedClass();
}
function WithSuperClassArguments() {
return new DerivedClass(0, 1, 2, 3, 4);
}

View File

@ -0,0 +1,31 @@
// Copyright 2017 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.
'use strict';
var DefaultConstructorBenchmark = new BenchmarkSuite('LeafConstructors',
[100], [
new Benchmark('WithExplicitArguments', false, false, 0,
WithExplicitArguments),
]);
const Point = class Point {
constructor(x, y, z) { this.x = x; this.y = y; this.z = z; }
}
const klasses = [
class A extends Point { constructor(x, y, z) { super(x, y, z); } },
class B extends Point { constructor(x, y, z) { super(x, y, z); } },
class C extends Point { constructor(x, y, z) { super(x, y, z); } },
class D extends Point { constructor(x, y, z) { super(x, y, z); } },
class E extends Point { constructor(x, y, z) { super(x, y, z); } }
];
function WithExplicitArguments() {
let result = null;
for (const klass of klasses) {
result = new klass(0, 1, 2);
}
return result;
};

View File

@ -0,0 +1,29 @@
// Copyright 2014 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.
d8.file.execute('../base.js');
d8.file.execute('super.js');
d8.file.execute('default-constructor.js');
d8.file.execute('leaf-constructors.js');
var success = true;
function PrintResult(name, result) {
print(name + '-Classes(Score): ' + result);
}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError });

View File

@ -0,0 +1,57 @@
// Copyright 2014 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.
'use strict';
var SuperBenchmark = new BenchmarkSuite('Super', [100], [
new Benchmark('SuperMethodCall', false, false, 0, SuperMethodCall),
new Benchmark('SuperGetterCall', false, false, 0, SuperGetterCall),
new Benchmark('SuperSetterCall', false, false, 0, SuperSetterCall),
]);
class Base {
constructor() {}
get x() {
return this._x++;
}
set x(v) {
this._x += v;
return this._x;
}
f() {
return this._x++;
}
}
class Derived extends Base {
constructor() {
super();
this._x = 1;
}
SuperCall() {
return super.f();
}
GetterCall() {
return super.x;
}
SetterCall() {
return super.x = 5;
}
}
var derived = new Derived();
function SuperMethodCall() {
return derived.SuperCall();
}
function SuperGetterCall() {
return derived.GetterCall();
}
function SuperSetterCall() {
return derived.SetterCall();
}