Skip to content

Commit cb7c7ba

Browse files
committed
Merge remote-tracking branch 'danleh/main' into kotlin
2 parents 0a66e6d + 3f5a114 commit cb7c7ba

File tree

111 files changed

+38607
-1556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+38607
-1556
lines changed

8bitbench/benchmark.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright 2025 the V8 project authors. All rights reserved.
2+
// Copyright 2025 Apple Inc. All rights reserved.
23
// Use of this source code is governed by a BSD-style license that can be
34
// found in the LICENSE file.
45

@@ -34,14 +35,20 @@ function dumpFrame(vec) {
3435

3536
class Benchmark {
3637
isInstantiated = false;
38+
romBinary;
39+
40+
async init() {
41+
Module.wasmBinary = await getBinary(wasmBinary);
42+
this.romBinary = await getBinary(romBinary);
43+
}
3744

3845
async runIteration() {
3946
if (!this.isInstantiated) {
4047
await wasm_bindgen(Module.wasmBinary);
4148
this.isInstantiated = true;
4249
}
4350

44-
wasm_bindgen.loadRom(Module.romBinary);
51+
wasm_bindgen.loadRom(this.romBinary);
4552

4653
const frameCount = 2 * 60;
4754
for (let i = 0; i < frameCount; ++i) {

ARES-6/Air/util.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,3 @@ function bubbleSort(array, lessThan)
168168
end--;
169169
}
170170
}
171-
172-
let currentTime;
173-
if (this.performance && performance.now)
174-
currentTime = function() { return performance.now() };
175-
else if (this.preciseTime)
176-
currentTime = function() { return preciseTime() * 1000; };
177-
else
178-
currentTime = function() { return +new Date(); };
179-

ARES-6/Babylon/benchmark.js

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017 Apple Inc. All rights reserved.
2+
* Copyright (C) 2017-2025 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -26,34 +26,18 @@
2626
"use strict";
2727

2828
class Benchmark {
29-
constructor(verbose = 0)
30-
{
29+
async init(verbose = 0) {
3130
let sources = [];
3231

3332
const files = [
34-
[isInBrowser ? airBlob : "./ARES-6/Babylon/air-blob.js", {}]
35-
, [isInBrowser ? basicBlob : "./ARES-6/Babylon/basic-blob.js", {}]
36-
, [isInBrowser ? inspectorBlob : "./ARES-6/Babylon/inspector-blob.js", {}]
37-
, [isInBrowser ? babylonBlob : "./ARES-6/Babylon/babylon-blob.js", {sourceType: "module"}]
33+
[airBlob, {}]
34+
, [basicBlob, {}]
35+
, [inspectorBlob, {}]
36+
, [babylonBlob, {sourceType: "module"}]
3837
];
3938

40-
for (let [file, options] of files) {
41-
function appendSource(s) {
42-
sources.push([file, s, options]);
43-
}
44-
45-
let s;
46-
if (isInBrowser) {
47-
let request = new XMLHttpRequest();
48-
request.open('GET', file, false);
49-
request.send(null);
50-
if (!request.responseText.length)
51-
throw new Error("Expect non-empty sources");
52-
appendSource(request.responseText);
53-
} else {
54-
appendSource(read(file));
55-
}
56-
}
39+
for (let [file, options] of files)
40+
sources.push([file, await getString(file), options]);
5741

5842
this.sources = sources;
5943
}

ARES-6/Basic/util.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

Dart/benchmark.js

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -261,25 +261,9 @@ class Benchmark {
261261
async init() {
262262
// The generated JavaScript code from dart2wasm is an ES module, which we
263263
// can only load with a dynamic import (since this file is not a module.)
264-
// TODO: Support ES6 modules in the driver instead of this one-off solution.
265-
// This probably requires a new `Benchmark` field called `modules` that
266-
// is a map from module variable name (which will hold the resulting module
267-
// namespace object) to relative module URL, which is resolved in the
268-
// `preRunnerCode`, similar to this code here.
269-
if (isInBrowser) {
270-
// In browsers, relative imports don't work since we are not in a module.
271-
// (`import.meta.url` is not defined.)
272-
const pathname = location.pathname.match(/^(.*\/)(?:[^.]+(?:\.(?:[^\/]+))+)?$/)[1];
273-
this.dart2wasmJsModule = await import(location.origin + pathname + "./Dart/build/flute.dart2wasm.mjs");
274-
} else {
275-
// In shells, relative imports require different paths, so try with and
276-
// without the "./" prefix (e.g., JSC requires it).
277-
try {
278-
this.dart2wasmJsModule = await import("Dart/build/flute.dart2wasm.mjs");
279-
} catch {
280-
this.dart2wasmJsModule = await import("./Dart/build/flute.dart2wasm.mjs");
281-
}
282-
}
264+
265+
Module.wasmBinary = await getBinary(wasmBinary);
266+
this.dart2wasmJsModule = await dynamicImport(jsModule);
283267
}
284268

285269
async runIteration() {

JetStream.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ a.button {
224224
color: transparent;
225225
background-image: linear-gradient(132deg, #96E5FF 0%, #96E5FF 2%, #86D9FF 42%, #8BDAFF 84%, #96E5FF 98%, #96E5FF 100%);
226226
-webkit-background-clip: text;
227-
background-size: 1200px 100%;
228227
background-repeat: no-repeat;
229228
-webkit-touch-callout: none;
230229
-webkit-user-select: none;

0 commit comments

Comments
 (0)