Skip to content

Commit

Permalink
[JavaScriptCore] Implement Xcode 16.0 beta 1-6 changes. (#20883)
Browse files Browse the repository at this point in the history
Note: there were no changes in beta 2-6.

---------

Co-authored-by: Alex Soto <[email protected]>
Co-authored-by: Manuel de la Pena <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2024
1 parent 5b25f9e commit a64b3e3
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 151 deletions.
10 changes: 10 additions & 0 deletions src/JavaScriptCore/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public enum JSType {
[iOS (13, 0)]
[MacCatalyst (13, 1)]
Symbol,
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
BigInt,
}

// typedef unsigned -> JSObjectRef.h
Expand All @@ -42,4 +44,12 @@ public enum JSClassAttributes : uint {
None = 0,
NoAutomaticPrototype = 1 << 1
}

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
public enum JSRelationCondition : uint {
Undefined,
Equal,
GreaterThan,
LessThan,
}
}
52 changes: 52 additions & 0 deletions src/javascriptcore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ partial interface JSValue {
[Export ("toUInt32")]
uint ToUInt32 ();

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("toInt64")]
long ToInt64 ();

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("toUInt64")]
ulong ToUInt64 ();

[Export ("toNumber")]
NSNumber ToNumber ();

Expand Down Expand Up @@ -333,6 +341,50 @@ partial interface JSValue {
[MacCatalyst (13, 1)]
[Export ("isSymbol")]
bool IsSymbol { get; }

[Static]
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("valueWithNewBigIntFromString:inContext:")]
[return: NullAllowed]
JSValue CreateNewBigInt (string @string, JSContext context);

[Static]
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("valueWithNewBigIntFromInt64:inContext:")]
[return: NullAllowed]
JSValue CreateNewBigInt (long int64, JSContext context);

[Static]
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("valueWithNewBigIntFromUInt64:inContext:")]
[return: NullAllowed]
JSValue CreateNewBigInt (ulong uint64, JSContext context);

[Static]
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("valueWithNewBigIntFromDouble:inContext:")]
[return: NullAllowed]
JSValue CreateNewBigInt (double uint64, JSContext context);

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("isBigInt")]
bool IsBigInt { get; }

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("compareJSValue:")]
JSRelationCondition Compare (JSValue other);

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("compareInt64:")]
JSRelationCondition Compare (long other);

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("compareUInt64:")]
JSRelationCondition Compare (ulong other);

[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
[Export ("compareDouble:")]
JSRelationCondition Compare (double other);
}

/// <summary>Class that maintains a binding between a JavaScript and Objective-C value.</summary>
Expand Down
17 changes: 17 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13174,6 +13174,11 @@ F:JavaScriptCore.JSPropertyAttributes.DontDelete
F:JavaScriptCore.JSPropertyAttributes.DontEnum
F:JavaScriptCore.JSPropertyAttributes.None
F:JavaScriptCore.JSPropertyAttributes.ReadOnly
F:JavaScriptCore.JSRelationCondition.Equal
F:JavaScriptCore.JSRelationCondition.GreaterThan
F:JavaScriptCore.JSRelationCondition.LessThan
F:JavaScriptCore.JSRelationCondition.Undefined
F:JavaScriptCore.JSType.BigInt
F:JavaScriptCore.JSType.Boolean
F:JavaScriptCore.JSType.Null
F:JavaScriptCore.JSType.Number
Expand Down Expand Up @@ -38664,9 +38669,17 @@ M:JavaScriptCore.JSManagedValue.#ctor(JavaScriptCore.JSValue)
M:JavaScriptCore.JSManagedValue.Get(JavaScriptCore.JSValue,Foundation.NSObject)
M:JavaScriptCore.JSManagedValue.Get(JavaScriptCore.JSValue)
M:JavaScriptCore.JSValue.Call(JavaScriptCore.JSValue[])
M:JavaScriptCore.JSValue.Compare(JavaScriptCore.JSValue)
M:JavaScriptCore.JSValue.Compare(System.Double)
M:JavaScriptCore.JSValue.Compare(System.Int64)
M:JavaScriptCore.JSValue.Compare(System.UInt64)
M:JavaScriptCore.JSValue.Construct(JavaScriptCore.JSValue[])
M:JavaScriptCore.JSValue.CreateArray(JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreateError(System.String,JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreateNewBigInt(System.Double,JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreateNewBigInt(System.Int64,JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreateNewBigInt(System.String,JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreateNewBigInt(System.UInt64,JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreateObject(JavaScriptCore.JSContext)
M:JavaScriptCore.JSValue.CreatePromise(JavaScriptCore.JSContext,JavaScriptCore.JSPromiseCreationExecutor)
M:JavaScriptCore.JSValue.CreateRegularExpression(System.String,System.String,JavaScriptCore.JSContext)
Expand Down Expand Up @@ -38702,6 +38715,7 @@ M:JavaScriptCore.JSValue.ToDate
M:JavaScriptCore.JSValue.ToDictionary
M:JavaScriptCore.JSValue.ToDouble
M:JavaScriptCore.JSValue.ToInt32
M:JavaScriptCore.JSValue.ToInt64
M:JavaScriptCore.JSValue.ToNumber
M:JavaScriptCore.JSValue.ToObject
M:JavaScriptCore.JSValue.ToObject(ObjCRuntime.Class)
Expand All @@ -38711,6 +38725,7 @@ M:JavaScriptCore.JSValue.ToRect
M:JavaScriptCore.JSValue.ToSize
M:JavaScriptCore.JSValue.ToString
M:JavaScriptCore.JSValue.ToUInt32
M:JavaScriptCore.JSValue.ToUInt64
M:JavaScriptCore.JSValue.Undefined(JavaScriptCore.JSContext)
M:JavaScriptCore.JSVirtualMachine.#ctor
M:JavaScriptCore.JSVirtualMachine.AddManagedReference(Foundation.NSObject,Foundation.NSObject)
Expand Down Expand Up @@ -68141,6 +68156,7 @@ P:JavaScriptCore.JSPropertyDescriptorKeys.Value
P:JavaScriptCore.JSPropertyDescriptorKeys.Writable
P:JavaScriptCore.JSValue.Context
P:JavaScriptCore.JSValue.IsArray
P:JavaScriptCore.JSValue.IsBigInt
P:JavaScriptCore.JSValue.IsBoolean
P:JavaScriptCore.JSValue.IsDate
P:JavaScriptCore.JSValue.IsNull
Expand Down Expand Up @@ -80655,6 +80671,7 @@ T:iTunesLibrary.ITLibrary
T:iTunesLibrary.ITLibraryNotifications
T:iTunesLibrary.MediaItemProperty
T:JavaScriptCore.JSPromiseCreationExecutor
T:JavaScriptCore.JSRelationCondition
T:LinkPresentation.LPErrorCode
T:LinkPresentation.LPLinkMetadata
T:LinkPresentation.LPLinkView
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,16 @@
!missing-pinvoke! JSValueMakeSymbol is not bound
!missing-pinvoke! JSGlobalContextIsInspectable is not bound
!missing-pinvoke! JSGlobalContextSetInspectable is not bound
!missing-pinvoke! JSBigIntCreateWithDouble is not bound
!missing-pinvoke! JSBigIntCreateWithInt64 is not bound
!missing-pinvoke! JSBigIntCreateWithString is not bound
!missing-pinvoke! JSBigIntCreateWithUInt64 is not bound
!missing-pinvoke! JSValueCompare is not bound
!missing-pinvoke! JSValueCompareDouble is not bound
!missing-pinvoke! JSValueCompareInt64 is not bound
!missing-pinvoke! JSValueCompareUInt64 is not bound
!missing-pinvoke! JSValueIsBigInt is not bound
!missing-pinvoke! JSValueToInt32 is not bound
!missing-pinvoke! JSValueToInt64 is not bound
!missing-pinvoke! JSValueToUInt32 is not bound
!missing-pinvoke! JSValueToUInt64 is not bound
25 changes: 0 additions & 25 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-JavaScriptCore.todo

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
!missing-enum! JSRelationCondition not bound
!missing-pinvoke! JSBigIntCreateWithDouble is not bound
!missing-pinvoke! JSBigIntCreateWithInt64 is not bound
!missing-pinvoke! JSBigIntCreateWithString is not bound
!missing-pinvoke! JSBigIntCreateWithUInt64 is not bound
!missing-pinvoke! JSValueCompare is not bound
!missing-pinvoke! JSValueCompareDouble is not bound
!missing-pinvoke! JSValueCompareInt64 is not bound
!missing-pinvoke! JSValueCompareUInt64 is not bound
!missing-pinvoke! JSValueIsBigInt is not bound
!missing-pinvoke! JSValueToInt32 is not bound
!missing-pinvoke! JSValueToInt64 is not bound
!missing-pinvoke! JSValueToUInt32 is not bound
!missing-pinvoke! JSValueToUInt64 is not bound
!missing-selector! +JSValue::valueWithNewBigIntFromDouble:inContext: not bound
!missing-selector! +JSValue::valueWithNewBigIntFromInt64:inContext: not bound
!missing-selector! +JSValue::valueWithNewBigIntFromString:inContext: not bound
Expand Down
25 changes: 0 additions & 25 deletions tests/xtro-sharpie/api-annotations-dotnet/tvOS-JavaScriptCore.todo

This file was deleted.

13 changes: 13 additions & 0 deletions tests/xtro-sharpie/common-JavaScriptCore.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,16 @@
!missing-pinvoke! JSValueMakeSymbol is not bound
!missing-pinvoke! JSGlobalContextIsInspectable is not bound
!missing-pinvoke! JSGlobalContextSetInspectable is not bound
!missing-pinvoke! JSBigIntCreateWithDouble is not bound
!missing-pinvoke! JSBigIntCreateWithInt64 is not bound
!missing-pinvoke! JSBigIntCreateWithString is not bound
!missing-pinvoke! JSBigIntCreateWithUInt64 is not bound
!missing-pinvoke! JSValueCompare is not bound
!missing-pinvoke! JSValueCompareDouble is not bound
!missing-pinvoke! JSValueCompareInt64 is not bound
!missing-pinvoke! JSValueCompareUInt64 is not bound
!missing-pinvoke! JSValueIsBigInt is not bound
!missing-pinvoke! JSValueToInt32 is not bound
!missing-pinvoke! JSValueToInt64 is not bound
!missing-pinvoke! JSValueToUInt32 is not bound
!missing-pinvoke! JSValueToUInt64 is not bound
25 changes: 0 additions & 25 deletions tests/xtro-sharpie/iOS-JavaScriptCore.todo

This file was deleted.

13 changes: 0 additions & 13 deletions tests/xtro-sharpie/macOS-JavaScriptCore.todo
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
!missing-enum! JSRelationCondition not bound
!missing-pinvoke! JSBigIntCreateWithDouble is not bound
!missing-pinvoke! JSBigIntCreateWithInt64 is not bound
!missing-pinvoke! JSBigIntCreateWithString is not bound
!missing-pinvoke! JSBigIntCreateWithUInt64 is not bound
!missing-pinvoke! JSValueCompare is not bound
!missing-pinvoke! JSValueCompareDouble is not bound
!missing-pinvoke! JSValueCompareInt64 is not bound
!missing-pinvoke! JSValueCompareUInt64 is not bound
!missing-pinvoke! JSValueIsBigInt is not bound
!missing-pinvoke! JSValueToInt32 is not bound
!missing-pinvoke! JSValueToInt64 is not bound
!missing-pinvoke! JSValueToUInt32 is not bound
!missing-pinvoke! JSValueToUInt64 is not bound
!missing-selector! +JSValue::valueWithNewBigIntFromDouble:inContext: not bound
!missing-selector! +JSValue::valueWithNewBigIntFromInt64:inContext: not bound
!missing-selector! +JSValue::valueWithNewBigIntFromString:inContext: not bound
Expand Down
25 changes: 0 additions & 25 deletions tests/xtro-sharpie/tvOS-JavaScriptCore.todo

This file was deleted.

0 comments on commit a64b3e3

Please sign in to comment.