Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JavaScriptCore] Implement Xcode 16.0 beta 1-6 changes. #20883

Merged
merged 9 commits into from
Aug 21, 2024
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
dalexsoto marked this conversation as resolved.
Show resolved Hide resolved
}
}
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 @@ -13047,6 +13047,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 @@ -38402,9 +38407,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 @@ -38440,6 +38453,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 @@ -38449,6 +38463,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 @@ -67653,6 +67668,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 @@ -80077,6 +80093,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
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.

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.

25 changes: 0 additions & 25 deletions tests/xtro-sharpie/tvOS-JavaScriptCore.todo

This file was deleted.

Loading