Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ jobs:
maxParallel: 6
matrix:
Linux.Debug:
image_name: 'ubuntu-22.04'
image_name: 'ubuntu-24.04'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'Debug'
libtype_flag: ''
Linux.NoJit:
image_name: 'ubuntu-22.04'
image_name: 'ubuntu-24.04'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'Debug'
libtype_flag: '-DDISABLE_JIT=ON'
Linux.ReleaseWithDebug:
image_name: 'ubuntu-22.04'
image_name: 'ubuntu-24.04'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'RelWithDebInfo'
libtype_flag: ''
Linux.Release:
image_name: 'ubuntu-22.04'
image_name: 'ubuntu-24.04'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'Release'
libtype_flag: ''
Ubuntu20.ReleaseWithDebug:
image_name: 'ubuntu-20.04'
Ubuntu22.ReleaseWithDebug:
image_name: 'ubuntu-22.04'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'RelWithDebInfo'
libtype_flag: ''
Ubuntu20.Release:
image_name: 'ubuntu-20.04'
Ubuntu22.Release:
image_name: 'ubuntu-22.04'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'Release'
libtype_flag: ''
Expand Down
3 changes: 2 additions & 1 deletion bin/ChakraCore/ChakraCoreDllFunc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Runtime.h"
Expand Down Expand Up @@ -174,7 +175,7 @@ void ChakraBinaryAutoSystemInfoInit(AutoSystemInfo * autoSystemInfo)

#if !ENABLE_NATIVE_CODEGEN
HRESULT JsInitializeJITServer(
__in GUID* connectionUuid,
_In_ GUID* connectionUuid,
__in_opt void* securityDescriptor,
__in_opt void* alpcSecurityDescriptor)
{
Expand Down
5 changes: 3 additions & 2 deletions bin/ChakraCore/ConfigParserExternals.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Common.h"
#include "Core/ConfigParser.h"

bool ConfigParserAPI::FillConsoleTitle(__ecount(cchBufferSize) LPWSTR buffer, size_t cchBufferSize, __in LPWSTR moduleName)
bool ConfigParserAPI::FillConsoleTitle(__ecount(cchBufferSize) LPWSTR buffer, size_t cchBufferSize, _In_ LPWSTR moduleName)
{
return false;
}

void ConfigParserAPI::DisplayInitialOutput(__in LPWSTR moduleName)
void ConfigParserAPI::DisplayInitialOutput(_In_ LPWSTR moduleName)
{
}

Expand Down
5 changes: 3 additions & 2 deletions bin/ChakraCore/TestHooks.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Runtime.h"
Expand Down Expand Up @@ -28,7 +29,7 @@ namespace Js

#ifdef ENABLE_TEST_HOOKS

HRESULT __stdcall SetConfigFlags(__in int argc, __in_ecount(argc) LPWSTR argv[], ICustomConfigFlags* customConfigFlags)
HRESULT __stdcall SetConfigFlags(_In_ int argc, __in_ecount(argc) LPWSTR argv[], ICustomConfigFlags* customConfigFlags)
{
CmdLineArgsParser parser(customConfigFlags);
if (parser.Parse(argc, argv) != 0)
Expand All @@ -39,7 +40,7 @@ HRESULT __stdcall SetConfigFlags(__in int argc, __in_ecount(argc) LPWSTR argv[],
return S_OK;
}

HRESULT __stdcall SetConfigFile(__in LPWSTR strConfigFile)
HRESULT __stdcall SetConfigFile(_In_ LPWSTR strConfigFile)
{
CmdLineArgsParser parser;
ConfigParser::ParseCustomConfigFile(parser, strConfigFile);
Expand Down
3 changes: 2 additions & 1 deletion bin/GCStress/GCStress.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
Expand Down Expand Up @@ -148,7 +149,7 @@ class Location
VerifyCondition(found);

// Zero pointers in order to eliminate false-positives
memset(holder, 0, heapObject.GetSize());
memset((void*)holder, 0, heapObject.GetSize());

bool success = heapObject.ClearImplicitRootBit();
VerifyCondition(success);
Expand Down
5 changes: 3 additions & 2 deletions bin/GCStress/StubExternalApi.cpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Common.h"
#include "CommonInl.h" // TODO: Try to remove this later

#include "Core/ConfigParser.h"

bool ConfigParserAPI::FillConsoleTitle(__ecount(cchBufferSize) LPWSTR buffer, size_t cchBufferSize, __in LPWSTR moduleName)
bool ConfigParserAPI::FillConsoleTitle(__ecount(cchBufferSize) LPWSTR buffer, size_t cchBufferSize, _In_ LPWSTR moduleName)
{
swprintf_s(buffer, cchBufferSize, _u("Chakra GC: %lu - %s"), GetCurrentProcessId(), moduleName);

return true;
}

void ConfigParserAPI::DisplayInitialOutput(__in LPWSTR moduleName)
void ConfigParserAPI::DisplayInitialOutput(_In_ LPWSTR moduleName)
{
Output::Print(_u("Chakra GC\n"));
Output::Print(_u("INIT: PID : %d\n"), GetCurrentProcessId());
Expand Down
3 changes: 2 additions & 1 deletion bin/NativeTests/BigUIntTest.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------

Expand All @@ -17,7 +18,7 @@ namespace Js
Assert(false);
}

bool Throw::ReportAssert(__in char const *, unsigned int, __in char const *, __in char const *)
bool Throw::ReportAssert(_In_ char const *, unsigned int, _In_ char const *, _In_ char const *)
{
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions bin/ch/ChakraRtInterface.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
Expand Down Expand Up @@ -342,8 +342,8 @@ class ChakraRTInterface
static void UnloadChakraDll(HINSTANCE library);

static HRESULT SetAssertToConsoleFlag(bool flag) { return CHECKED_CALL(SetAssertToConsoleFlag, flag); }
static HRESULT SetConfigFlags(__in int argc, __in_ecount(argc) LPWSTR argv[], ICustomConfigFlags* customConfigFlags) { return CHECKED_CALL(SetConfigFlags, argc, argv, customConfigFlags); }
static HRESULT SetConfigFile(__in LPWSTR strConfigFileName) { return CHECKED_CALL(SetConfigFile, strConfigFileName); }
static HRESULT SetConfigFlags(_In_ int argc, __in_ecount(argc) LPWSTR argv[], ICustomConfigFlags* customConfigFlags) { return CHECKED_CALL(SetConfigFlags, argc, argv, customConfigFlags); }
static HRESULT SetConfigFile(_In_ LPWSTR strConfigFileName) { return CHECKED_CALL(SetConfigFile, strConfigFileName); }
static HRESULT GetFileNameFlag(BSTR * filename) { return CHECKED_CALL(GetFilenameFlag, filename); }
static HRESULT PrintConfigFlagsUsageString() { m_usageStringPrinted = true; return CHECKED_CALL(PrintConfigFlagsUsageString); }

Expand Down
3 changes: 2 additions & 1 deletion bin/ch/Helpers.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "stdafx.h"
Expand Down Expand Up @@ -423,7 +424,7 @@ LPCWSTR Helpers::JsErrorCodeToString(JsErrorCode jsErrorCode)
}
}

void Helpers::LogError(__in __nullterminated const char16 *msg, ...)
void Helpers::LogError(_In_ __nullterminated const char16 *msg, ...)
{
va_list args;
va_start(args, msg);
Expand Down
3 changes: 2 additions & 1 deletion bin/ch/Helpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
Expand All @@ -9,7 +10,7 @@ class Helpers
public :
static HRESULT LoadScriptFromFile(LPCSTR filename, LPCSTR& contents, UINT* lengthBytesOut = nullptr, std::string* fullPath = nullptr, bool shouldMute = false);
static LPCWSTR JsErrorCodeToString(JsErrorCode jsErrorCode);
static void LogError(__in __nullterminated const char16 *msg, ...);
static void LogError(_In_ __nullterminated const char16 *msg, ...);
static HRESULT LoadBinaryFile(LPCSTR filename, LPCSTR& contents, UINT& lengthBytes, bool printFileOpenError = true);

static void TTReportLastIOErrorAsNeeded(BOOL ok, const char* msg);
Expand Down
2 changes: 1 addition & 1 deletion bin/ch/WScriptJsrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2102,7 +2102,7 @@ JsErrorCode WScriptJsrt::ReportModuleCompletionCallback(JsModuleRecord module, J
}

JsErrorCode WScriptJsrt::FetchImportedModuleHelper(JsModuleRecord referencingModule,
JsValueRef specifier, __out JsModuleRecord* dependentModuleRecord, LPCSTR refdir)
JsValueRef specifier, _Out_ JsModuleRecord* dependentModuleRecord, LPCSTR refdir)
{
JsModuleRecord moduleRecord = JS_INVALID_REFERENCE;
AutoString specifierStr;
Expand Down
4 changes: 2 additions & 2 deletions bin/ch/WScriptJsrt.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
Expand Down Expand Up @@ -149,7 +149,7 @@ class WScriptJsrt
static JsValueRef CALLBACK SerializeObject(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
static JsValueRef CALLBACK Deserialize(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);

static JsErrorCode FetchImportedModuleHelper(JsModuleRecord referencingModule, JsValueRef specifier, __out JsModuleRecord* dependentModuleRecord, LPCSTR refdir = nullptr);
static JsErrorCode FetchImportedModuleHelper(JsModuleRecord referencingModule, JsValueRef specifier, _Out_ JsModuleRecord* dependentModuleRecord, LPCSTR refdir = nullptr);

static MessageQueue *messageQueue;
static DWORD_PTR sourceContext;
Expand Down
3 changes: 2 additions & 1 deletion bin/rl/rl.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
// rl.cpp
Expand Down Expand Up @@ -4345,7 +4346,7 @@ ProcessConfig
// Get the defaults from the default node.

TestInfo testInfo;
memset(&testInfo, 0, sizeof(TestInfo));
memset((void*)&testInfo, 0, sizeof(TestInfo));

if (!GetTestInfoFromNode(CfgFile, defaultNode, &testInfo))
{
Expand Down
3 changes: 2 additions & 1 deletion bin/rl/rl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
// rl.h
Expand Down Expand Up @@ -472,7 +473,7 @@ class WorkQueue {
/*
* Create the semaphores for the work lists
*/
memset(&sa, 0, sizeof(sa));
memset((void*)&sa, 0, sizeof(sa));
sa.nLength = sizeof(sa);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
Expand Down
3 changes: 2 additions & 1 deletion bin/rl/rlfeint.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#undef UNICODE
Expand Down Expand Up @@ -73,7 +74,7 @@ SpawnRLFE(
if (NULStdout == INVALID_HANDLE_VALUE)
goto cleanup;

memset(&si, 0, sizeof(si));
memset((void*)&si, 0, sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdOutput = NULStdout;
Expand Down
5 changes: 3 additions & 2 deletions bin/rl/rlmp.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
//
Expand Down Expand Up @@ -823,14 +824,14 @@ PipeSpawn(
return NULL;
}

memset(&StartupInfo, 0, sizeof(STARTUPINFO));
memset((void*)&StartupInfo, 0, sizeof(STARTUPINFO));
StartupInfo.cb = sizeof(STARTUPINFO);
StartupInfo.hStdOutput = WriteHandle;
StartupInfo.hStdError = ErrorHandle;
StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
StartupInfo.dwFlags = STARTF_USESTDHANDLES;

memset(&ProcessInformation, 0, sizeof(PROCESS_INFORMATION));
memset((void*)&ProcessInformation, 0, sizeof(PROCESS_INFORMATION));
ProcessInformation.hThread = INVALID_HANDLE_VALUE;
ProcessInformation.hProcess = INVALID_HANDLE_VALUE;

Expand Down
3 changes: 2 additions & 1 deletion lib/Backend/CodeGenNumberAllocator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Backend.h"
Expand Down Expand Up @@ -396,7 +397,7 @@ Js::JavascriptNumber* XProcNumberPageSegmentImpl::AllocateNumber(Func* func, dou

XProcNumberPageSegmentImpl::XProcNumberPageSegmentImpl()
{
memset(this, 0, sizeof(XProcNumberPageSegment));
memset((void*)this, 0, sizeof(XProcNumberPageSegment));
}

void XProcNumberPageSegmentImpl::Initialize(bool recyclerVerifyEnabled, uint recyclerVerifyPad)
Expand Down
9 changes: 5 additions & 4 deletions lib/Backend/EmitBuffer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Backend.h"
Expand Down Expand Up @@ -101,7 +102,7 @@ EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::FreeAllocations(bool r
}

template <typename TAlloc, typename TPreReservedAlloc, class SyncObject>
bool EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::IsInHeap(__in void* address)
bool EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::IsInHeap(_In_ void* address)
{
AutoRealOrFakeCriticalSection<SyncObject> autocs(&this->criticalSection);
return this->allocationHeap.IsInHeap(address);
Expand Down Expand Up @@ -319,7 +320,7 @@ bool EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::FinalizeAllocatio

template <typename TAlloc, typename TPreReservedAlloc, class SyncObject>
EmitBufferAllocation<TAlloc, TPreReservedAlloc>*
EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::GetBuffer(TEmitBufferAllocation *allocation, __in size_t bytes, __deref_bcount(bytes) BYTE** ppBuffer)
EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::GetBuffer(TEmitBufferAllocation *allocation, _In_ size_t bytes, __deref_bcount(bytes) BYTE** ppBuffer)
{
Assert(this->criticalSection.IsLocked());

Expand All @@ -345,7 +346,7 @@ EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::GetBuffer(TEmitBufferA
//----------------------------------------------------------------------------
template <typename TAlloc, typename TPreReservedAlloc, class SyncObject>
EmitBufferAllocation<TAlloc, TPreReservedAlloc>*
EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::AllocateBuffer(__in size_t bytes, __deref_bcount(bytes) BYTE** ppBuffer, ushort pdataCount /*=0*/, ushort xdataSize /*=0*/, bool canAllocInPreReservedHeapPageSegment /*=false*/,
EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::AllocateBuffer(_In_ size_t bytes, __deref_bcount(bytes) BYTE** ppBuffer, ushort pdataCount /*=0*/, ushort xdataSize /*=0*/, bool canAllocInPreReservedHeapPageSegment /*=false*/,
bool isAnyJittedCode /* = false*/)
{
AutoRealOrFakeCriticalSection<SyncObject> autoCs(&this->criticalSection);
Expand Down Expand Up @@ -456,7 +457,7 @@ bool EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::CommitBufferForIn
//----------------------------------------------------------------------------
template <typename TAlloc, typename TPreReservedAlloc, class SyncObject>
bool
EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::CommitBuffer(TEmitBufferAllocation* allocation, __in const size_t destBufferBytes, __out_bcount(destBufferBytes) BYTE* destBuffer, __in size_t bytes, __in_bcount(bytes) const BYTE* sourceBuffer, __in DWORD alignPad)
EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::CommitBuffer(TEmitBufferAllocation* allocation, _In_ const size_t destBufferBytes, __out_bcount(destBufferBytes) BYTE* destBuffer, _In_ size_t bytes, __in_bcount(bytes) const BYTE* sourceBuffer, _In_ DWORD alignPad)
{
AutoRealOrFakeCriticalSection<SyncObject> autoCs(&this->criticalSection);

Expand Down
Loading