Skip to content

Commit

Permalink
Merge pull request #14 from oven-sh/jarred/upgrade-jul23
Browse files Browse the repository at this point in the history
Upgrade WebKit, July 23rd edition
  • Loading branch information
Jarred-Sumner authored Jul 24, 2023
2 parents 1e5c61e + 284095f commit 3a53c6a
Show file tree
Hide file tree
Showing 28,706 changed files with 1,868,302 additions and 836,673 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org

[*.{c,cpp,h,rb}]
indent_style = space
Expand Down
8 changes: 2 additions & 6 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
4 changes: 4 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"name": "dev",
"hidden": true,
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": {
"type": "BOOL",
"value": "ON"
},
"DEVELOPER_MODE": {
"type": "BOOL",
"value": "ON"
Expand Down
7 changes: 5 additions & 2 deletions Configurations/CommonBase.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "Sanitizers.xcconfig"
#include "SDKVariant.xcconfig"
#include "WebKitProjectPaths.xcconfig"
#include "WebKitTargetConditionals.xcconfig"
#include "SDKAdditions.xcconfig"

// Prefix Definitions
//
Expand All @@ -43,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 @@ -55,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
39 changes: 39 additions & 0 deletions Configurations/SDKAdditions.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// 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 = $(WK_NOT_$(USE_INTERNAL_SDK));
// Prior to Sonoma, downlevel macOS and STP builds link against AppleJPEGXL.framework.
WK_HAS_VERSIONED_SDK_ADDITIONS[sdk=macos*] = $(WK_HAS_VERSIONED_SDK_ADDITIONS$(WK_MACOS_1400));
WK_HAS_VERSIONED_SDK_ADDITIONS_MACOS_BEFORE_1400 = YES;
WK_HAS_VERSIONED_SDK_ADDITIONS_MACOS_SINCE_1400 = $(WK_NOT_$(USE_INTERNAL_SDK));

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/SDKVariant.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ WK_CHECK_CATALYST_iosmac = YES;
WK_IS_CATALYST = $(WK_NOT_$(WK_EMPTY_$(WK_CHECK_CATALYST)));

WK_ALTERNATE_WEBKIT_SDK_PATH = $(WK_ALTERNATE_WEBKIT_SDK_PATH_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
WK_ALTERNATE_WEBKIT_SDK_PATH_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/;
WK_ALTERNATE_WEBKIT_SDK_PATH_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR);

WK_PLATFORM_NAME = $(WK_PLATFORM_NAME_ALTERNATE_$(WK_USE_ALTERNATE_PLATFORM_NAME));
WK_PLATFORM_NAME_ALTERNATE_YES = $(WK_ALTERNATE_PLATFORM_NAME);
Expand Down
10 changes: 7 additions & 3 deletions Configurations/Sanitizers.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ WK_SANITIZER_GCC_OPTIMIZATION_LEVEL_Debug = 0;
WK_SANITIZER_GCC_OPTIMIZATION_LEVEL_Production = 1;
WK_SANITIZER_GCC_OPTIMIZATION_LEVEL_Release = 1;

WK_SANITIZER_OTHER_CFLAGS = $(WK_ANY_SANITIZER_CFLAGS_$(WK_ANY_SANITIZER_ENABLED)) $(WK_ADDRESS_SANITIZER_OTHER_CFLAGS_$(ENABLE_ADDRESS_SANITIZER)) $(WK_UNDEFINED_BEHAVIOR_SANITIZER_OTHER_CFLAGS_$(ENABLE_UNDEFINED_BEHAVIOR_SANITIZER));
WK_SANITIZER_OTHER_CFLAGS = $(WK_ANY_SANITIZER_CFLAGS_$(WK_ANY_SANITIZER_ENABLED)) $(WK_ADDRESS_SANITIZER_OTHER_CFLAGS_$(ENABLE_ADDRESS_SANITIZER)) $(WK_UNDEFINED_BEHAVIOR_SANITIZER_OTHER_CFLAGS_$(ENABLE_UNDEFINED_BEHAVIOR_SANITIZER)) $(WK_LIBFUZZER_OTHER_CFLAGS_$(ENABLE_LIBFUZZER));

WK_SANITIZER_OTHER_CPLUSPLUSFLAGS = $(WK_ADDRESS_SANITIZER_OTHER_CPLUSPLUSFLAGS_$(ENABLE_ADDRESS_SANITIZER));
WK_SANITIZER_OTHER_CPLUSPLUSFLAGS = $(WK_ADDRESS_SANITIZER_OTHER_CPLUSPLUSFLAGS_$(ENABLE_ADDRESS_SANITIZER)) $(WK_LIBFUZZER_OTHER_CPLUSPLUSFLAGS_$(ENABLE_LIBFUZZER));

WK_SANITIZER_OTHER_LDFLAGS = $(WK_ANY_SANITIZER_LDFLAGS_$(WK_ANY_SANITIZER_ENABLED));

Expand All @@ -42,7 +42,7 @@ WK_SANITIZER_OTHER_LDFLAGS = $(WK_ANY_SANITIZER_LDFLAGS_$(WK_ANY_SANITIZER_ENABL
// FIXME: Tell Xcode not to compile host-side tools with sanitizers enabled (see <rdar://99386433>).
// Workaround is to use `WK_SANITIZER_DISALLOWED = YES`.

WK_ANY_SANITIZER_ENABLED = $(WK_AND_$(WK_OR_$(ENABLE_ADDRESS_SANITIZER)_$(WK_OR_$(ENABLE_THREAD_SANITIZER)_$(ENABLE_UNDEFINED_BEHAVIOR_SANITIZER)))_$(WK_NOT_$(WK_SANITIZER_DISALLOWED)));
WK_ANY_SANITIZER_ENABLED = $(WK_AND_$(WK_OR_$(ENABLE_ADDRESS_SANITIZER)_$(WK_OR_$(ENABLE_THREAD_SANITIZER)_$(WK_OR_$(ENABLE_UNDEFINED_BEHAVIOR_SANITIZER)_$(ENABLE_LIBFUZZER))))_$(WK_NOT_$(WK_SANITIZER_DISALLOWED)));

// -DRELEASE_WITHOUT_OPTIMIZATIONS is from <wtf/Compiler.h>.
WK_ANY_SANITIZER_CFLAGS_YES = -DRELEASE_WITHOUT_OPTIMIZATIONS -fno-omit-frame-pointer -g;
Expand Down Expand Up @@ -82,3 +82,7 @@ WK_XCODE_VERSION_AFTER_13_3_1700 = YES;
// -fno-delete-null-pointer-checks: do not let the compiler remove nullptr checks that could otherwise be removed because they are considered undefined behavior.
// -fno-optimize-sibling-calls: disable tail call elimination for more accurate crash stacks.
WK_UNDEFINED_BEHAVIOR_SANITIZER_OTHER_CFLAGS_YES = -fno-delete-null-pointer-checks -fno-optimize-sibling-calls -fno-sanitize=vptr -fsanitize=enum,return;

// Libfuzzer

WK_LIBFUZZER_OTHER_CFLAGS_YES = -fsanitize-coverage=inline-8bit-counters,trace-cmp -fno-sanitize-coverage=pc-table -Wno-error;
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 = 14;
TINY_VERSION = 22;
MICRO_VERSION = 0;
NANO_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION);
Expand Down
26 changes: 20 additions & 6 deletions Configurations/WebKitProjectPaths.xcconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 Apple Inc. All rights reserved.
// Copyright (C) 2022-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
Expand All @@ -21,6 +21,8 @@
// (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"

// Includes both Safari Technology Preview and StagedFrameworks cases.
WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));

Expand Down Expand Up @@ -71,11 +73,23 @@ 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;

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);
// 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_5_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_6_$(SRCROOT:dir:standardizepath:dir:standardizepath: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_WORKSPACE_DIR_5_Source = $(SRCROOT)/../../../../../..;
WK_WORKSPACE_DIR_6_Source = $(SRCROOT)/../../../../../../..;

WK_DOWNLEVEL_FRAMEWORK_STUBS_DIR[sdk=macos*] = $(WK_DOWNLEVEL_FRAMEWORK_STUBS_DIR$(WK_MACOS_1400);
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
2 changes: 1 addition & 1 deletion JSTests/ChakraCore/test/Array/array_literal.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
[3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23,3.5,4,5,6,7,23.23]
[]
[,,,32]
[[object Object],4,function () {},6,7,23.23]
[[object Object],4,function() {},6,7,23.23]
3 changes: 2 additions & 1 deletion JSTests/ChakraCore/test/Closures/bug_OS_2299723.baseline-jsc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
eval('var x = 5') threw 'Can't create duplicate variable in eval: 'x''
x: 5
eval('var y = 5') threw 'Attempted to assign to readonly property.'
eval('var y = 5') threw 'Can't create duplicate variable in eval: 'y''
eval('y = 5') threw 'Attempted to assign to readonly property.'
y: 1
2 changes: 1 addition & 1 deletion JSTests/ChakraCore/test/Function/toString.baseline-jsc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function parseFloat() {
[native code]
}
Test 'toString()' on anonymous function:
function () {
function() {
//anonymous
a = a + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion JSTests/ChakraCore/test/LetConst/tdz1.baseline-jsc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ReferenceError: Cannot access uninitialized variable.
local x
ReferenceError: Cannot access uninitialized variable.
a is a string
ReferenceError: Cannot access uninitialized variable.
did not delete a
did not delete a
ReferenceError: Cannot access uninitialized variable.
ReferenceError: Cannot access uninitialized variable.
Expand Down
4 changes: 2 additions & 2 deletions JSTests/ChakraCore/test/es5/ObjLitGetSet.baseline-jsc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Success: Expected invalid syntax if set keyword is a string (then it is just a n
Success: Expected invalid syntax if get keyword is a string (then it is just a normal property name) = true, got true
PASS
(test 5): Object literal get set function toString
function () { return _foo; }
function (value) { _foo = value; }
get foo() { return _foo; }
set foo(value) { _foo = value; }
PASS
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`);
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function() {
var target = {k0: 0, k1: 1, k2: 2, k3: 3, k4: 4, k5: 5, k6: 6, k7: 7, k8: 8, k9: 9};
var targetKeys = Object.keys(target);
var proxy = new Proxy(target, {});

var lastObj = {};
for (var i = 0; i < 2e5; ++i)
lastObj = Object.assign({}, proxy);

if (Object.keys(lastObj).join() !== targetKeys.join())
throw new Error("Bad assertion!");
})();
16 changes: 16 additions & 0 deletions JSTests/microbenchmarks/proxy-ownkeys-via-object-assign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function() {
var target = {k0: 0, k1: 1, k2: 2, k3: 3, k4: 4, k5: 5, k6: 6, k7: 7, k8: 8, k9: 9};
var targetKeys = Object.keys(target);
var proxy = new Proxy(target, {
ownKeys() {
return targetKeys;
},
});

var lastObj = {};
for (var i = 0; i < 2e5; ++i)
lastObj = Object.assign({}, proxy);

if (Object.keys(lastObj).join() !== targetKeys.join())
throw new Error("Bad assertion!");
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function() {
var target = {k0: 0, k1: 1, k2: 2, k3: 3, k4: 4, k5: 5, k6: 6, k7: 7, k8: 8, k9: 9};
var targetKeys = Object.keys(target);
var proxy = new Proxy(target, {});

var proxyKeys;
for (var i = 0; i < 2e5; ++i)
proxyKeys = Object.keys(proxy);

if (proxyKeys.join() !== targetKeys.join())
throw new Error("Bad assertion!");
})();
16 changes: 16 additions & 0 deletions JSTests/microbenchmarks/proxy-ownkeys-via-object-keys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function() {
var target = {k0: 0, k1: 1, k2: 2, k3: 3, k4: 4, k5: 5, k6: 6, k7: 7, k8: 8, k9: 9};
var targetKeys = Object.keys(target);
var proxy = new Proxy(target, {
ownKeys() {
return targetKeys;
},
});

var proxyKeys;
for (var i = 0; i < 2e5; ++i)
proxyKeys = Object.keys(proxy);

if (proxyKeys.join() !== targetKeys.join())
throw new Error("Bad assertion!");
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function() {
var target = {k0: 0, k1: 1, k2: 2, k3: 3, k4: 4, k5: 5, k6: 6, k7: 7, k8: 8, k9: 9};
var targetKeys = Reflect.ownKeys(target);
var proxy = new Proxy(target, {});

var proxyKeys;
for (var i = 0; i < 2e5; ++i)
proxyKeys = Reflect.ownKeys(proxy);

if (proxyKeys.join() !== targetKeys.join())
throw new Error("Bad assertion!");
})();
16 changes: 16 additions & 0 deletions JSTests/microbenchmarks/proxy-ownkeys-via-reflect-ownkeys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function() {
var target = {k0: 0, k1: 1, k2: 2, k3: 3, k4: 4, k5: 5, k6: 6, k7: 7, k8: 8, k9: 9};
var targetKeys = Reflect.ownKeys(target);
var proxy = new Proxy(target, {
ownKeys() {
return targetKeys;
},
});

var proxyKeys;
for (var i = 0; i < 2e5; ++i)
proxyKeys = Reflect.ownKeys(proxy);

if (proxyKeys.join() !== targetKeys.join())
throw new Error("Bad assertion!");
})();
Loading

0 comments on commit 3a53c6a

Please sign in to comment.