Skip to content

Commit

Permalink
Merge pull request #12 from movableink/merge-upstream-2023-07-14
Browse files Browse the repository at this point in the history
Merge in upstream 2023-07-14
  • Loading branch information
mnutt committed Jul 31, 2023
2 parents ba8a1bc + 676bb0d commit 194b8bc
Show file tree
Hide file tree
Showing 11,233 changed files with 276,465 additions and 140,483 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ DerivedData
/Tools/buildstream/repo

# Ignore auto-generated files by VS & VSCode.
*.vcproj.*.user
*.suo
*.ncb
/.vs/
/.vscode/

Expand All @@ -43,10 +40,9 @@ __pycache__
# Ignore CMake caches outside of the build directory.
__cmake_systeminformation/

# Ignore files installed by WebKitSupportLibrary/WebKitAuxiliaryLibrary/WinCairoRequirements
/WebKitSupportLibrary.zip
# Ignore port files downloaded to WebKitLibraries
/WebKitLibraries/win/
!/WebKitLibraries/win/tools/scripts/
/WebKitLibraries/playstation/

# Ignore files generated by Qt Creator:
*.pro.user
Expand Down Expand Up @@ -74,4 +70,4 @@ Tools/wpe/cog
Source/ThirdParty/ANGLE/parsetab.py

# Ignore user CMake presets
CMakeUserPresets.json
CMakeUserPresets.json
6 changes: 5 additions & 1 deletion Configurations/CommonBase.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "Sanitizers.xcconfig"
#include "SDKVariant.xcconfig"
#include "WebKitProjectPaths.xcconfig"
#include "SDKAdditions.xcconfig"

// Prefix Definitions
//
Expand All @@ -42,7 +43,7 @@ GCC_OPTIMIZATION_LEVEL = $(WK_GCC_OPTIMIZATION_LEVEL_SANITIZER_OVERRIDE_$(WK_ANY
WK_GCC_OPTIMIZATION_LEVEL_SANITIZER_OVERRIDE_NO = $(WK_DEFAULT_GCC_OPTIMIZATION_LEVEL);
WK_GCC_OPTIMIZATION_LEVEL_SANITIZER_OVERRIDE_YES = $(WK_SANITIZER_GCC_OPTIMIZATION_LEVEL);

WK_COMMON_OTHER_CFLAGS = $(WK_SANITIZER_OTHER_CFLAGS);
WK_COMMON_OTHER_CFLAGS = $(WK_LIBFUZZER_OTHER_FLAGS) $(WK_SANITIZER_OTHER_CFLAGS);
OTHER_CFLAGS = $(inherited) $(WK_COMMON_OTHER_CFLAGS);

WK_COMMON_OTHER_CPLUSPLUSFLAGS = $(WK_LIBCPP_ASSERTIONS_CFLAGS) $(WK_SANITIZER_OTHER_CPLUSPLUSFLAGS);
Expand All @@ -54,6 +55,9 @@ OTHER_LDFLAGS = $(inherited) $(WK_COMMON_OTHER_LDFLAGS);
WK_COMMON_WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wextra -Wformat=2 -Wundef;
WARNING_CFLAGS = $(inherited) $(WK_COMMON_WARNING_CFLAGS);

WK_LIBFUZZER_OTHER_FLAGS = $(WK_ENABLE_LIBFUZZER_$(ENABLE_LIBFUZZER));
WK_ENABLE_LIBFUZZER_YES = -DENABLE_LIBFUZZER=1;

WK_LIBCPP_ASSERTIONS_CFLAGS = $(WK_LIBCPP_ASSERTIONS_CFLAGS_$(WK_PLATFORM_NAME));
WK_LIBCPP_ASSERTIONS_CFLAGS_iphoneos = $(WK_LIBCPP_ASSERTIONS_CFLAGS$(WK_IOS_17));
WK_LIBCPP_ASSERTIONS_CFLAGS_iphonesimulator = $(WK_LIBCPP_ASSERTIONS_CFLAGS$(WK_IOS_17));
Expand Down
38 changes: 38 additions & 0 deletions Configurations/SDKAdditions.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (C) 2023 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "WebKitTargetConditionals.xcconfig"

// FIXME: Add unversioned sparse SDKs for headers and framework stubs that we can share between OS versions.
//WK_HAS_UNVERSIONED_SDK_ADDITIONS = ;

WK_HAS_VERSIONED_SDK_ADDITIONS = YES;
WK_HAS_VERSIONED_SDK_ADDITIONS[sdk=macos*] = $(WK_HAS_VERSIONED_SDK_ADDITIONS_$(USE_INTERNAL_SDK);
WK_HAS_VERSIONED_SDK_ADDITIONS_ = $(WK_HAS_VERSIONED_SDK_ADDITIONS$(WK_MACOS_1400));
WK_HAS_VERSIONED_SDK_ADDITIONS_MACOS_SINCE_1400 = YES;

WK_ADDITIONAL_SDKS = $(WK_ADDITIONAL_SDKS_UNVERSIONED_$(WK_HAS_UNVERSIONED_SDK_ADDITIONS)_VERSIONED_$(WK_HAS_VERSIONED_SDK_ADDITIONS));
WK_ADDITIONAL_SDKS_UNVERSIONED__VERSIONED_ = ;
WK_ADDITIONAL_SDKS_UNVERSIONED__VERSIONED_YES = $(WK_VERSIONED_SDK_ADDITIONS_PATH);
WK_ADDITIONAL_SDKS_UNVERSIONED_YES_VERSIONED_ = $(WK_UNVERSIONED_SDK_ADDITIONS_PATH);
WK_ADDITIONAL_SDKS_UNVERSIONED_YES_VERSIONED_YES = $(WK_UNVERSIONED_SDK_ADDITIONS_PATH) $(WK_VERSIONED_SDK_ADDITIONS_PATH);
2 changes: 1 addition & 1 deletion Configurations/Version.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

MAJOR_VERSION = 616;
MINOR_VERSION = 1;
TINY_VERSION = 20;
TINY_VERSION = 22;
MICRO_VERSION = 0;
NANO_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION);
Expand Down
23 changes: 18 additions & 5 deletions Configurations/WebKitProjectPaths.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,27 @@ UMBRELLA_FRAMEWORKS_DIR_OVERRIDE_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH = $(BUILT_PRODUCTS_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH)/WebKitAdditions;
WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH[config=Production] = $(SDK_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH)/WebKitAdditions;

// The root directory of the workspace / WebKit repo is determined by how many directories up "Source" or "Tools" is from the SRCROOT.
WK_WORKSPACE_DIR = $(WK_WORKSPACE_DIR_1_$(SRCROOT:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_2_$(SRCROOT:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_3_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_4_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath);
WK_WORKSPACE_DIR_1_Source = $(SRCROOT)/../..;
WK_WORKSPACE_DIR_1_Tools = $(SRCROOT)/../..;
WK_WORKSPACE_DIR_2_Source = $(SRCROOT)/../../..;
WK_WORKSPACE_DIR_2_Tools = $(SRCROOT)/../../..;
WK_WORKSPACE_DIR_3_Source = $(SRCROOT)/../../../..;
WK_WORKSPACE_DIR_4_Source = $(SRCROOT)/../../../../..;

WK_PRIVATE_FRAMEWORK_STUBS_DIR = $(WK_PRIVATE_FRAMEWORK_STUBS_DIR_$(USE_INTERNAL_SDK));
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=macos*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/$(TARGET_MAC_OS_X_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=iphone*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=appletv*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/$(WK_TARGET_TVOS_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=watch*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/$(WK_TARGET_WATCHOS_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=macos*] = $(WK_WORKSPACE_DIR)/WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/$(TARGET_MAC_OS_X_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=iphone*] = $(WK_WORKSPACE_DIR)/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=appletv*] = $(WK_WORKSPACE_DIR)/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/$(WK_TARGET_TVOS_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORK_STUBS_DIR_[sdk=watch*] = $(WK_WORKSPACE_DIR)/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/$(WK_TARGET_WATCHOS_VERSION_MAJOR);

WK_DOWNLEVEL_FRAMEWORK_STUBS_DIR[sdk=macos*] = $(WK_DOWNLEVEL_FRAMEWORK_STUBS_DIR$(WK_MACOS_1400);
WK_DOWNLEVEL_FRAMEWORK_STUBS_DIR_MACOS_BEFORE_1400 = $(PROJECT_DIR)/../../WebKitLibraries/DownlevelFrameworkStubs/$(TARGET_MAC_OS_X_VERSION_MAJOR);
WK_DOWNLEVEL_FRAMEWORK_STUBS_DIR_MACOS_BEFORE_1400 = $(WK_WORKSPACE_DIR)/WebKitLibraries/DownlevelFrameworkStubs/$(TARGET_MAC_OS_X_VERSION_MAJOR);

WK_VERSIONED_SDK_ADDITIONS_PATH = $(WK_VERSIONED_SDK_ADDITIONS_PATH_$(USE_INTERNAL_SDK));
WK_VERSIONED_SDK_ADDITIONS_PATH_ = $(WK_WORKSPACE_DIR)/WebKitLibraries/SDKs/$(PLATFORM_NAME)$($(DEPLOYMENT_TARGET_SETTING_NAME):base).0-additions.sdk;
WK_VERSIONED_SDK_ADDITIONS_PATH_YES = $(WK_WORKSPACE_DIR)/WebKitLibraries/SDKs/$(PLATFORM_NAME)$($(DEPLOYMENT_TARGET_SETTING_NAME):base).0.internal-additions.sdk;

WTF_BUILD_SCRIPTS_DIR = $(WTF_BUILD_SCRIPTS_DIR_$(CONFIGURATION));
WTF_BUILD_SCRIPTS_DIR_Release = $(WTF_BUILD_SCRIPTS_DIR_engineering);
Expand Down
25 changes: 25 additions & 0 deletions JSTests/microbenchmarks/array-concat-double-and-int32.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

function test(array1, array2) {
return array1.concat(array2);
}
noInline(test);

var array1 = [2.1, 2.2, 2.3, 2.4];
var array2 = [0, 1, 2, 3, 4]
for (var i = 0; i < 1e4; ++i) {
var result = test(array1, array2);
shouldBe(result[0], 2.1);
shouldBe(result[1], 2.2);
shouldBe(result[2], 2.3);
shouldBe(result[3], 2.4);
shouldBe(result[4], 0);
shouldBe(result[5], 1);
shouldBe(result[6], 2);
shouldBe(result[7], 3);
shouldBe(result[8], 4);
shouldBe(result.length, 9);
}
25 changes: 25 additions & 0 deletions JSTests/microbenchmarks/array-concat-int32-and-double.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

function test(array1, array2) {
return array1.concat(array2);
}
noInline(test);

var array1 = [0, 1, 2, 3, 4]
var array2 = [2.1, 2.2, 2.3, 2.4];
for (var i = 0; i < 1e4; ++i) {
var result = test(array1, array2);
shouldBe(result[0], 0);
shouldBe(result[1], 1);
shouldBe(result[2], 2);
shouldBe(result[3], 3);
shouldBe(result[4], 4);
shouldBe(result[5], 2.1);
shouldBe(result[6], 2.2);
shouldBe(result[7], 2.3);
shouldBe(result[8], 2.4);
shouldBe(result.length, 9);
}
13 changes: 13 additions & 0 deletions JSTests/microbenchmarks/array-string-concat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

function test(array) {
return "hello" + array + "ok";
}
noInline(test);

var array = [42];
for (var i = 0; i < 1e6; ++i)
shouldBe(test(array), `hello42ok`);
12 changes: 12 additions & 0 deletions JSTests/microbenchmarks/rope-resolve-recursive.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

for (var i = 0; i < 100; ++i) {
let string = '';
for (let i = 0; i < 3e4; ++i)
string += String.fromCharCode(i & 0x7f);
shouldBe(string.length, 3e4);
shouldBe(string[30], String.fromCharCode(30 & 0x7f));
}
51 changes: 51 additions & 0 deletions JSTests/microbenchmarks/string-index-of-simple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

function test0(string) {
return string.indexOf("Hello");
}
noInline(test0);

function test1(string) {
return string.indexOf("okHellooko");
}
noInline(test1);

function test2(string, index) {
return string.indexOf("Hello", index);
}

function test3(string, index) {
return string.indexOf("okHellooko", index);
}

function test4(string) {
return string.indexOf("H");
}

function test5(string, index) {
return string.indexOf("H", index);
}

var string = ".............................................okokHellookok................................";
for (var i = 0; i < 1e6; ++i) {
shouldBe(test0(string), 49);
shouldBe(test1(string), 47);

shouldBe(test2(string, 20), 49);
shouldBe(test2(string, 47), 49);
shouldBe(test2(string, 49), 49);
shouldBe(test2(string, 50), -1);
shouldBe(test2(string, string.length), -1);
shouldBe(test3(string, 20), 47);
shouldBe(test3(string, 47), 47);
shouldBe(test3(string, 48), -1);
shouldBe(test3(string, string.length), -1);

shouldBe(test4(string), 49);
shouldBe(test5(string, 20), 49);
shouldBe(test5(string, 49), 49);
shouldBe(test5(string, 50), -1);
}
30 changes: 30 additions & 0 deletions JSTests/stress/PutStack-sinking-through-DeadFlush-unification.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function test(a, flag, flag2, bailout) {
a = 3333
if (flag) {
if (flag2) {
a = 1111;
Object.toString();
} else {
a = 2222;
Object.toString();
}
Object.toString();
}
Object.toString();
bailout ++;
return a;
}

function main() {
for(let i = 0; i < 1000; i ++) {
test(0, true, true, 0);
test(0, true, false, 0);
test(0, false, true, 0);
test(0, false, false, 0);
}

let result = test(0, true, true, 0x7fffffff);
if (result !== 1111)
throw 'Expected test() to return 1111, got ' + result;
}
main()
30 changes: 0 additions & 30 deletions JSTests/stress/array-group-by-null-or-undefined.js

This file was deleted.

0 comments on commit 194b8bc

Please sign in to comment.