Skip to content

Commit c2e0a03

Browse files
committedAug 30, 2024
update to Visual Studio 2022 build tools v143; update ChakraCore to latest; 64-bit DOF integration
1 parent c5f365f commit c2e0a03

File tree

63 files changed

+2202
-1028
lines changed

Some content is hidden

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

63 files changed

+2202
-1028
lines changed
 

‎.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Settings backup *.txt
4242
GameStats.csv
4343
zlib/contrib/vstudio/vc14/x86/**
4444
PinballY/shaders/*.h
45+
litehtml/Debug-UTF8/**
46+
litehtml/Release-UTF8/**
47+
zlib/contrib/vstudio/vc14/ia64/**
48+
zlib/contrib/vstudio/vc14/x64/**
4549
Builds/**
4650
WixSetup/Generated/*
4751
**/ZlibStatRelease/**

‎ChakraCore/include/ChakraCommon.h

+99-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525

2626
// Platform specific code
2727
#if defined(_WIN32) && defined(_MSC_VER)
28-
#include <oaidl.h>
28+
#include <windows.h>
2929

3030
// Header macros
3131
#define CHAKRA_CALLBACK CALLBACK
3232
#define CHAKRA_API STDAPI_(JsErrorCode)
3333

34+
typedef unsigned char byte;
3435
typedef DWORD_PTR ChakraCookie;
3536
typedef BYTE* ChakraBytePtr;
3637
#else // Non-Windows VC++
@@ -41,6 +42,7 @@ typedef BYTE* ChakraBytePtr;
4142
#define _In_z_
4243
#define _In_opt_
4344
#define _Inout_
45+
#define _Inout_opt_
4446
#define _Out_
4547
#define _Out_opt_
4648
#define _In_reads_(x)
@@ -217,7 +219,7 @@ typedef unsigned short uint16_t;
217219
/// </summary>
218220
JsErrorInvalidContext,
219221
/// <summary>
220-
/// Module evaluation is called in wrong context.
222+
/// The Module HostInfoKind provided was invalid.
221223
/// </summary>
222224
JsInvalidModuleHostInfoKind,
223225
/// <summary>
@@ -237,6 +239,7 @@ typedef unsigned short uint16_t;
237239
/// Module was not yet evaluated when JsGetModuleNamespace was called.
238240
/// </summary>
239241
JsErrorModuleNotEvaluated,
242+
240243
/// <summary>
241244
/// Category of errors that relates to errors occurring within the engine itself.
242245
/// </summary>
@@ -313,6 +316,18 @@ typedef unsigned short uint16_t;
313316
/// VM was unable to perform the request action
314317
/// </summary>
315318
JsErrorDiagUnableToPerformAction,
319+
/// <summary>
320+
/// Serializer/Deserializer does not support current data
321+
/// </summary>
322+
JsSerializerNotSupported,
323+
/// <summary>
324+
/// Current object is not transferable during serialization
325+
/// </summary>
326+
JsTransferableNotSupported,
327+
/// <summary>
328+
/// Current object is already detached when serialized
329+
/// </summary>
330+
JsTransferableAlreadyDetached,
316331
} JsErrorCode;
317332

318333
/// <summary>
@@ -549,6 +564,10 @@ typedef unsigned short uint16_t;
549564
/// This one needs to be set for Utf16
550565
/// </summary>
551566
JsParseScriptAttributeArrayBufferIsUtf16Encoded = 0x2,
567+
/// <summary>
568+
/// Script should be parsed in strict mode
569+
/// </summary>
570+
JsParseScriptAttributeStrictMode = 0x4,
552571
} JsParseScriptAttributes;
553572

554573
/// <summary>
@@ -624,6 +643,27 @@ typedef unsigned short uint16_t;
624643
JsDataView = 12,
625644
} JsValueType;
626645

646+
typedef enum _JsScriptEncodingType
647+
{
648+
Utf8,
649+
Utf16
650+
} JsScriptEncodingType;
651+
652+
typedef enum _JsScriptContainerType
653+
{
654+
HeapAllocatedBuffer
655+
} JsScriptContainerType;
656+
657+
typedef struct _JsScriptContents
658+
{
659+
void * container;
660+
JsScriptEncodingType encodingType;
661+
JsScriptContainerType containerType;
662+
JsSourceContext sourceContext;
663+
size_t contentLengthInBytes;
664+
WCHAR * fullPath;
665+
} JsScriptContents;
666+
627667
/// <summary>
628668
/// User implemented callback routine for memory allocation events
629669
/// </summary>
@@ -922,7 +962,7 @@ typedef unsigned short uint16_t;
922962
/// <remarks>
923963
/// Removes a reference to a <c>JsRef</c> handle that was created by <c>JsAddRef</c>.
924964
/// </remarks>
925-
/// <param name="ref">The object to add a reference to.</param>
965+
/// <param name="ref">The object to remove the reference from.</param>
926966
/// <param name="count">The object's new reference count (can pass in null).</param>
927967
/// <returns>
928968
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
@@ -996,7 +1036,7 @@ typedef unsigned short uint16_t;
9961036
/// </returns>
9971037
CHAKRA_API
9981038
JsSetCurrentContext(
999-
_In_ JsContextRef context);
1039+
_In_opt_ JsContextRef context);
10001040

10011041
/// <summary>
10021042
/// Gets the script context that the object belongs to.
@@ -1051,7 +1091,7 @@ typedef unsigned short uint16_t;
10511091
_Out_ JsRuntimeHandle *runtime);
10521092

10531093
/// <summary>
1054-
/// Tells the runtime to do any idle processing it need to do.
1094+
/// Tells the runtime to do any idle processing it needs to do.
10551095
/// </summary>
10561096
/// <remarks>
10571097
/// <para>
@@ -2412,6 +2452,60 @@ typedef unsigned short uint16_t;
24122452
_In_opt_ JsPromiseContinuationCallback promiseContinuationCallback,
24132453
_In_opt_ void *callbackState);
24142454

2455+
/// <summary>
2456+
/// Note: Experimental API
2457+
/// Starts a request for background script parsing on another thread
2458+
/// </summary>
2459+
/// <param name="contents">ScriptContents struct with data needed to start parsing</param>
2460+
/// <param name="dwBgParseCookie">Identifier for subsequent BGParse operations</param>
2461+
/// <returns>
2462+
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
2463+
/// </returns>
2464+
CHAKRA_API
2465+
JsQueueBackgroundParse_Experimental(
2466+
_In_ JsScriptContents* contents,
2467+
_Out_ DWORD* dwBgParseCookie);
2468+
2469+
/// <summary>
2470+
/// Note: Experimental API
2471+
/// Appropriately frees resources associated with a previously queued background parse
2472+
/// </summary>
2473+
/// <param name="dwBgParseCookie">Identifier for BGParse operation</param>
2474+
/// <param name="buffer">Pointer to script source buffer, used for validation</param>
2475+
/// <param name="callerOwnsBuffer">When <c>true</c>, caller is responsible for freeing buffer</param>
2476+
/// <returns>
2477+
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
2478+
/// </returns>
2479+
CHAKRA_API
2480+
JsDiscardBackgroundParse_Experimental(
2481+
_In_ DWORD dwBgParseCookie,
2482+
_In_ void* buffer,
2483+
_Out_ bool* callerOwnsBuffer);
2484+
2485+
/// <summary>
2486+
/// Note: Experimental API
2487+
/// Executes the background parsed script
2488+
/// </summary>
2489+
/// <param name="dwBgParseCookie">Identifier for subsequent BGParse operations</param>
2490+
/// <param name="script">Pointer to script source</param>
2491+
/// <param name="sourceContext">JsSourceContext identifier</param>
2492+
/// <param name="url">Path to the parsed script</param>
2493+
/// <param name="parseAttributes"></param>
2494+
/// <param name="parserState">[May not be needed]</param>
2495+
/// <param name="result">Result of script execution</param>
2496+
/// <returns>
2497+
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
2498+
/// </returns>
2499+
CHAKRA_API
2500+
JsExecuteBackgroundParse_Experimental(
2501+
_In_ DWORD dwBgParseCookie,
2502+
_In_ JsValueRef script,
2503+
_In_ JsSourceContext sourceContext,
2504+
_In_ WCHAR *url,
2505+
_In_ JsParseScriptAttributes parseAttributes,
2506+
_In_ JsValueRef parserState,
2507+
_Out_ JsValueRef *result);
2508+
24152509
#ifdef _WIN32
24162510
#include "ChakraCommonWindows.h"
24172511
#endif // _WIN32

0 commit comments

Comments
 (0)