diff --git a/lib/Backend/Backend.h b/lib/Backend/Backend.h
index 722b235d20d..3d123303b6a 100644
--- a/lib/Backend/Backend.h
+++ b/lib/Backend/Backend.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
@@ -20,15 +21,15 @@
#include "Language/JavascriptMathOperators.inl"
#include "Language/JavascriptStackWalker.h"
#include "Language/CodeGenRecyclableData.h"
-#include "Library/JavascriptGenerator.h"
-#include "Library/JavascriptRegularExpression.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Generators/JavascriptGenerator.h"
+#include "Library/Regex/JavascriptRegularExpression.h"
+#include "Library/Functions/StackScriptFunction.h"
#include "Library/JavascriptProxy.h"
-#include "Library/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
#include "Language/InterpreterStackFrame.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
// SIMD
#include "Language/SimdOps.h"
diff --git a/lib/Backend/JnHelperMethod.cpp b/lib/Backend/JnHelperMethod.cpp
index fcb6d7d8072..4bb51bf9138 100644
--- a/lib/Backend/JnHelperMethod.cpp
+++ b/lib/Backend/JnHelperMethod.cpp
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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"
@@ -7,13 +8,13 @@
// Parser includes
#include "RegexCommon.h"
-#include "Library/RegexHelper.h"
+#include "Library/Regex/RegexHelper.h"
#ifdef ENABLE_SCRIPT_DEBUGGING
#include "Debug/DiagHelperMethodWrapper.h"
#endif
#include "Math/CrtSSE2Math.h"
-#include "Library/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
#include "RuntimeMathPch.h"
namespace IR
diff --git a/lib/Backend/amd64/LowererMDArch.cpp b/lib/Backend/amd64/LowererMDArch.cpp
index cc752b4a39c..5dff0d5d45c 100644
--- a/lib/Backend/amd64/LowererMDArch.cpp
+++ b/lib/Backend/amd64/LowererMDArch.cpp
@@ -1,11 +1,12 @@
//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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"
#include "LowererMDArch.h"
-#include "Library/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
const Js::OpCode LowererMD::MDExtend32Opcode = Js::OpCode::MOVSXD;
diff --git a/lib/Backend/i386/LowererMDArch.cpp b/lib/Backend/i386/LowererMDArch.cpp
index 32e934d7afb..b57261f0b8d 100644
--- a/lib/Backend/i386/LowererMDArch.cpp
+++ b/lib/Backend/i386/LowererMDArch.cpp
@@ -1,11 +1,12 @@
//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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"
#include "LowererMDArch.h"
-#include "Library/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
const Js::OpCode LowererMD::MDExtend32Opcode = Js::OpCode::MOV;
diff --git a/lib/Parser/ParserPch.h b/lib/Parser/ParserPch.h
index 9aa31905dc2..12a641496fd 100644
--- a/lib/Parser/ParserPch.h
+++ b/lib/Parser/ParserPch.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
@@ -25,5 +26,5 @@
#include "ByteCode/FuncInfo.h"
#include "ByteCode/ScopeInfo.h"
-#include "Library/JavascriptFunction.h"
+#include "Library/Functions/JavascriptFunction.h"
#include "Language/JavascriptStackWalker.h"
diff --git a/lib/Runtime/Base/CharStringCache.cpp b/lib/Runtime/Base/CharStringCache.cpp
index f41cb54c646..b1479ce73f0 100644
--- a/lib/Runtime/Base/CharStringCache.cpp
+++ b/lib/Runtime/Base/CharStringCache.cpp
@@ -1,11 +1,12 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeBasePch.h"
-#include "Library/ProfileString.h"
-#include "Library/SingleCharString.h"
+#include "Library/String/ProfileString.h"
+#include "Library/String/SingleCharString.h"
using namespace Js;
diff --git a/lib/Runtime/Base/FunctionBody.cpp b/lib/Runtime/Base/FunctionBody.cpp
index 5f625fc7be7..90e019abcd8 100644
--- a/lib/Runtime/Base/FunctionBody.cpp
+++ b/lib/Runtime/Base/FunctionBody.cpp
@@ -30,7 +30,7 @@
#include "Parser.h"
#include "RegexCommon.h"
#include "RegexPattern.h"
-#include "Library/RegexHelper.h"
+#include "Library/Regex/RegexHelper.h"
#include "Language/InterpreterStackFrame.h"
#include "Library/ModuleRoot.h"
diff --git a/lib/Runtime/Base/ScriptContext.cpp b/lib/Runtime/Base/ScriptContext.cpp
index f9db1d61b29..c409fbec991 100644
--- a/lib/Runtime/Base/ScriptContext.cpp
+++ b/lib/Runtime/Base/ScriptContext.cpp
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeBasePch.h"
@@ -11,7 +12,7 @@
#include "ConfigFlagsList.h"
#include "ByteCode/ByteCodeApi.h"
-#include "Library/ProfileString.h"
+#include "Library/String/ProfileString.h"
#ifdef ENABLE_SCRIPT_DEBUGGING
#include "Debug/DiagHelperMethodWrapper.h"
#endif
diff --git a/lib/Runtime/ByteCode/ByteCodeGenerator.cpp b/lib/Runtime/ByteCode/ByteCodeGenerator.cpp
index 1ed46444cf4..afbf2fd13a7 100644
--- a/lib/Runtime/ByteCode/ByteCodeGenerator.cpp
+++ b/lib/Runtime/ByteCode/ByteCodeGenerator.cpp
@@ -5,7 +5,7 @@
//-------------------------------------------------------------------------------------------------------
#include "RuntimeByteCodePch.h"
#include "FormalsUtil.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
#if DBG
#include "pnodewalk.h"
diff --git a/lib/Runtime/ByteCode/ByteCodeSerializer.cpp b/lib/Runtime/ByteCode/ByteCodeSerializer.cpp
index 144be52c482..f2ec232b3a4 100644
--- a/lib/Runtime/ByteCode/ByteCodeSerializer.cpp
+++ b/lib/Runtime/ByteCode/ByteCodeSerializer.cpp
@@ -1,5 +1,5 @@
//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
@@ -8,7 +8,7 @@
#include "RegexCommon.h"
#include "RegexPattern.h"
-#include "Library/RegexHelper.h"
+#include "Library/Regex/RegexHelper.h"
#include "DataStructures/Option.h"
#include "DataStructures/ImmutableList.h"
@@ -17,7 +17,7 @@
#include "ByteCode/ByteCodeSerializer.h"
#include "Language/AsmJsModule.h"
-#include "Library/ES5Array.h"
+#include "Library/Array/ES5Array.h"
void ChakraBinaryBuildDateTimeHash(DWORD * buildDateHash, DWORD * buildTimeHash);
diff --git a/lib/Runtime/Debug/DiagObjectModel.cpp b/lib/Runtime/Debug/DiagObjectModel.cpp
index 784eb2650e0..0653d28cd93 100644
--- a/lib/Runtime/Debug/DiagObjectModel.cpp
+++ b/lib/Runtime/Debug/DiagObjectModel.cpp
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeDebugPch.h"
@@ -13,8 +14,8 @@
// Runtime includes
#include "Library/ObjectPrototypeObject.h"
#include "Library/JavascriptNumberObject.h"
-#include "Library/BoundFunction.h"
-#include "Library/JavascriptRegExpConstructor.h"
+#include "Library/Functions/BoundFunction.h"
+#include "Library/Regex/JavascriptRegExpConstructor.h"
#include "Library/SameValueComparer.h"
#include "Library/MapOrSetDataList.h"
#include "Library/JavascriptPromise.h"
@@ -28,7 +29,7 @@
#include "Types/DynamicObjectPropertyEnumerator.h"
#include "Types/JavascriptStaticEnumerator.h"
#include "Library/ForInObjectEnumerator.h"
-#include "Library/ES5Array.h"
+#include "Library/Array/ES5Array.h"
namespace Js
{
diff --git a/lib/Runtime/Debug/TTSnapObjects.cpp b/lib/Runtime/Debug/TTSnapObjects.cpp
index 7105d9ef0d5..2dc8fb37bf0 100644
--- a/lib/Runtime/Debug/TTSnapObjects.cpp
+++ b/lib/Runtime/Debug/TTSnapObjects.cpp
@@ -4,7 +4,7 @@
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeDebugPch.h"
-#include "Library/JavascriptGenerator.h"
+#include "Library/Generators/JavascriptGenerator.h"
#include "Language/InterpreterStackFrame.h"
#include "Library/JavascriptPromise.h"
diff --git a/lib/Runtime/Language/AsmJsLink.cpp b/lib/Runtime/Language/AsmJsLink.cpp
index 829327f4ce7..ee48d0ed1ee 100644
--- a/lib/Runtime/Language/AsmJsLink.cpp
+++ b/lib/Runtime/Language/AsmJsLink.cpp
@@ -1,12 +1,13 @@
//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLanguagePch.h"
#ifdef ASMJS_PLAT
-#include "Library/BoundFunction.h"
+#include "Library/Functions/BoundFunction.h"
namespace Js{
bool ASMLink::CheckArrayBuffer(ScriptContext* scriptContext, Var bufferView, const AsmJsModuleInfo * info)
{
diff --git a/lib/Runtime/Language/InterpreterStackFrame.cpp b/lib/Runtime/Language/InterpreterStackFrame.cpp
index bb0351e4e58..b031d74ea2b 100644
--- a/lib/Runtime/Language/InterpreterStackFrame.cpp
+++ b/lib/Runtime/Language/InterpreterStackFrame.cpp
@@ -1,5 +1,5 @@
//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Copyright (C) Microsoft. All rights reserved.
// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
@@ -7,13 +7,13 @@
#include "RuntimeLanguagePch.h"
#include "RuntimeMathPch.h"
#include "EHBailoutData.h"
-#include "Library/JavascriptRegularExpression.h"
+#include "Library/Regex/JavascriptRegularExpression.h"
#if DBG_DUMP
#include "ByteCode/OpCodeUtilAsmJs.h"
#endif
#include "Language/InterpreterStackFrame.h"
-#include "Library/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
#include "Library/ForInObjectEnumerator.h"
#include "Library/AtomicsOperations.h"
#include "../../WasmReader/WasmParseTree.h"
diff --git a/lib/Runtime/Language/JavascriptConversion.cpp b/lib/Runtime/Language/JavascriptConversion.cpp
index 9c41628d231..f75b7b46b99 100644
--- a/lib/Runtime/Language/JavascriptConversion.cpp
+++ b/lib/Runtime/Language/JavascriptConversion.cpp
@@ -1,11 +1,12 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLanguagePch.h"
#include "RuntimeMathPch.h"
#include "Library/JavascriptNumberObject.h"
-#include "Library/JavascriptStringObject.h"
+#include "Library/String/JavascriptStringObject.h"
#include "Library/DateImplementation.h"
#include "Library/JavascriptDate.h"
diff --git a/lib/Runtime/Language/JavascriptExceptionObject.cpp b/lib/Runtime/Language/JavascriptExceptionObject.cpp
index 4bb4ef3afe6..37ed92ea1b8 100644
--- a/lib/Runtime/Language/JavascriptExceptionObject.cpp
+++ b/lib/Runtime/Language/JavascriptExceptionObject.cpp
@@ -1,9 +1,10 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLanguagePch.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
namespace Js
{
diff --git a/lib/Runtime/Language/JavascriptOperators.cpp b/lib/Runtime/Language/JavascriptOperators.cpp
index 425b51e1c6b..7bd06b833c1 100644
--- a/lib/Runtime/Language/JavascriptOperators.cpp
+++ b/lib/Runtime/Language/JavascriptOperators.cpp
@@ -10,13 +10,13 @@
#include "Types/UnscopablesWrapperObject.h"
#include "Types/SpreadArgument.h"
#include "Library/JavascriptPromise.h"
-#include "Library/JavascriptRegularExpression.h"
+#include "Library/Regex/JavascriptRegularExpression.h"
#include "Library/ThrowErrorObject.h"
-#include "Library/JavascriptGeneratorFunction.h"
-#include "Library/JavascriptAsyncFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptAsyncFunction.h"
#include "Library/ForInObjectEnumerator.h"
-#include "Library/ES5Array.h"
+#include "Library/Array/ES5Array.h"
#include "Types/SimpleDictionaryPropertyDescriptor.h"
#include "Types/SimpleDictionaryTypeHandler.h"
#include "Language/ModuleNamespace.h"
diff --git a/lib/Runtime/Language/RuntimeLanguagePch.h b/lib/Runtime/Language/RuntimeLanguagePch.h
index 910f8b16453..9aa90ee9b8b 100644
--- a/lib/Runtime/Language/RuntimeLanguagePch.h
+++ b/lib/Runtime/Language/RuntimeLanguagePch.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
@@ -33,14 +34,14 @@
#include "Library/ArgumentsObject.h"
#include "Types/TypePropertyCache.h"
-#include "Library/JavascriptAsyncFromSyncIterator.h"
+#include "Library/Iterators/JavascriptAsyncFromSyncIterator.h"
#ifdef _CHAKRACOREBUILD
#include "Library/CustomExternalWrapperObject.h"
#endif
#include "Library/JavascriptProxy.h"
#include "Library/JavascriptSymbolObject.h"
-#include "Library/JavascriptGenerator.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Generators/JavascriptGenerator.h"
+#include "Library/Functions/StackScriptFunction.h"
#include "Library/HostObjectBase.h"
#ifdef ENABLE_MUTATION_BREAKPOINT
diff --git a/lib/Runtime/Library/ArgumentsObject.cpp b/lib/Runtime/Library/ArgumentsObject.cpp
index 80477729b55..8fc6fd672d7 100644
--- a/lib/Runtime/Library/ArgumentsObject.cpp
+++ b/lib/Runtime/Library/ArgumentsObject.cpp
@@ -4,7 +4,7 @@
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "Library/ArgumentsObjectEnumerator.h"
+#include "ArgumentsObjectEnumerator.h"
namespace Js
{
diff --git a/lib/Runtime/Library/ArgumentsObjectEnumerator.cpp b/lib/Runtime/Library/ArgumentsObjectEnumerator.cpp
index 159f29f9fd4..71c81115ea9 100644
--- a/lib/Runtime/Library/ArgumentsObjectEnumerator.cpp
+++ b/lib/Runtime/Library/ArgumentsObjectEnumerator.cpp
@@ -4,7 +4,7 @@
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "Library/ArgumentsObjectEnumerator.h"
+#include "ArgumentsObjectEnumerator.h"
namespace Js
{
diff --git a/lib/Runtime/Library/ES5Array.cpp b/lib/Runtime/Library/Array/ES5Array.cpp
similarity index 100%
rename from lib/Runtime/Library/ES5Array.cpp
rename to lib/Runtime/Library/Array/ES5Array.cpp
diff --git a/lib/Runtime/Library/ES5Array.h b/lib/Runtime/Library/Array/ES5Array.h
similarity index 100%
rename from lib/Runtime/Library/ES5Array.h
rename to lib/Runtime/Library/Array/ES5Array.h
diff --git a/lib/Runtime/Library/ES5ArrayIndexEnumerator.cpp b/lib/Runtime/Library/Array/ES5ArrayIndexEnumerator.cpp
similarity index 100%
rename from lib/Runtime/Library/ES5ArrayIndexEnumerator.cpp
rename to lib/Runtime/Library/Array/ES5ArrayIndexEnumerator.cpp
diff --git a/lib/Runtime/Library/ES5ArrayIndexEnumerator.h b/lib/Runtime/Library/Array/ES5ArrayIndexEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/ES5ArrayIndexEnumerator.h
rename to lib/Runtime/Library/Array/ES5ArrayIndexEnumerator.h
diff --git a/lib/Runtime/Library/ES5ArrayIndexStaticEnumerator.h b/lib/Runtime/Library/Array/ES5ArrayIndexStaticEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/ES5ArrayIndexStaticEnumerator.h
rename to lib/Runtime/Library/Array/ES5ArrayIndexStaticEnumerator.h
diff --git a/lib/Runtime/Library/JavascriptArray.cpp b/lib/Runtime/Library/Array/JavascriptArray.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptArray.cpp
rename to lib/Runtime/Library/Array/JavascriptArray.cpp
diff --git a/lib/Runtime/Library/JavascriptArray.h b/lib/Runtime/Library/Array/JavascriptArray.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptArray.h
rename to lib/Runtime/Library/Array/JavascriptArray.h
diff --git a/lib/Runtime/Library/JavascriptArray.inl b/lib/Runtime/Library/Array/JavascriptArray.inl
similarity index 100%
rename from lib/Runtime/Library/JavascriptArray.inl
rename to lib/Runtime/Library/Array/JavascriptArray.inl
diff --git a/lib/Runtime/Library/JavascriptArrayIndexEnumerator.cpp b/lib/Runtime/Library/Array/JavascriptArrayIndexEnumerator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexEnumerator.cpp
rename to lib/Runtime/Library/Array/JavascriptArrayIndexEnumerator.cpp
diff --git a/lib/Runtime/Library/JavascriptArrayIndexEnumerator.h b/lib/Runtime/Library/Array/JavascriptArrayIndexEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexEnumerator.h
rename to lib/Runtime/Library/Array/JavascriptArrayIndexEnumerator.h
diff --git a/lib/Runtime/Library/JavascriptArrayIndexEnumeratorBase.cpp b/lib/Runtime/Library/Array/JavascriptArrayIndexEnumeratorBase.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexEnumeratorBase.cpp
rename to lib/Runtime/Library/Array/JavascriptArrayIndexEnumeratorBase.cpp
diff --git a/lib/Runtime/Library/JavascriptArrayIndexEnumeratorBase.h b/lib/Runtime/Library/Array/JavascriptArrayIndexEnumeratorBase.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexEnumeratorBase.h
rename to lib/Runtime/Library/Array/JavascriptArrayIndexEnumeratorBase.h
diff --git a/lib/Runtime/Library/JavascriptArrayIndexSnapshotEnumerator.cpp b/lib/Runtime/Library/Array/JavascriptArrayIndexSnapshotEnumerator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexSnapshotEnumerator.cpp
rename to lib/Runtime/Library/Array/JavascriptArrayIndexSnapshotEnumerator.cpp
diff --git a/lib/Runtime/Library/JavascriptArrayIndexSnapshotEnumerator.h b/lib/Runtime/Library/Array/JavascriptArrayIndexSnapshotEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexSnapshotEnumerator.h
rename to lib/Runtime/Library/Array/JavascriptArrayIndexSnapshotEnumerator.h
diff --git a/lib/Runtime/Library/JavascriptArrayIndexStaticEnumerator.h b/lib/Runtime/Library/Array/JavascriptArrayIndexStaticEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIndexStaticEnumerator.h
rename to lib/Runtime/Library/Array/JavascriptArrayIndexStaticEnumerator.h
diff --git a/lib/Runtime/Library/SparseArraySegment.cpp b/lib/Runtime/Library/Array/SparseArraySegment.cpp
similarity index 100%
rename from lib/Runtime/Library/SparseArraySegment.cpp
rename to lib/Runtime/Library/Array/SparseArraySegment.cpp
diff --git a/lib/Runtime/Library/SparseArraySegment.h b/lib/Runtime/Library/Array/SparseArraySegment.h
similarity index 100%
rename from lib/Runtime/Library/SparseArraySegment.h
rename to lib/Runtime/Library/Array/SparseArraySegment.h
diff --git a/lib/Runtime/Library/SparseArraySegment.inl b/lib/Runtime/Library/Array/SparseArraySegment.inl
similarity index 100%
rename from lib/Runtime/Library/SparseArraySegment.inl
rename to lib/Runtime/Library/Array/SparseArraySegment.inl
diff --git a/lib/Runtime/Library/TypedArray.cpp b/lib/Runtime/Library/Array/TypedArray.cpp
similarity index 99%
rename from lib/Runtime/Library/TypedArray.cpp
rename to lib/Runtime/Library/Array/TypedArray.cpp
index 487a1ebf5b7..31e90afe134 100644
--- a/lib/Runtime/Library/TypedArray.cpp
+++ b/lib/Runtime/Library/Array/TypedArray.cpp
@@ -8,7 +8,7 @@
// can share the same array buffer.
//----------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "AtomicsOperations.h"
+#include "Library/AtomicsOperations.h"
#define INSTANTIATE_BUILT_IN_ENTRYPOINTS(typeName) \
template Var typeName::NewInstance(RecyclableObject* function, CallInfo callInfo, ...); \
diff --git a/lib/Runtime/Library/TypedArray.h b/lib/Runtime/Library/Array/TypedArray.h
similarity index 100%
rename from lib/Runtime/Library/TypedArray.h
rename to lib/Runtime/Library/Array/TypedArray.h
diff --git a/lib/Runtime/Library/TypedArrayIndexEnumerator.cpp b/lib/Runtime/Library/Array/TypedArrayIndexEnumerator.cpp
similarity index 100%
rename from lib/Runtime/Library/TypedArrayIndexEnumerator.cpp
rename to lib/Runtime/Library/Array/TypedArrayIndexEnumerator.cpp
diff --git a/lib/Runtime/Library/TypedArrayIndexEnumerator.h b/lib/Runtime/Library/Array/TypedArrayIndexEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/TypedArrayIndexEnumerator.h
rename to lib/Runtime/Library/Array/TypedArrayIndexEnumerator.h
diff --git a/lib/Runtime/Library/CMakeLists.txt b/lib/Runtime/Library/CMakeLists.txt
index bbcc53254f2..ef5c7684b21 100644
--- a/lib/Runtime/Library/CMakeLists.txt
+++ b/lib/Runtime/Library/CMakeLists.txt
@@ -4,122 +4,133 @@ endif()
if(CC_TARGETS_AMD64)
set(Wasm_dep
- WasmLibrary.cpp
- WebAssembly.cpp
- WebAssemblyEnvironment.cpp
- WebAssemblyInstance.cpp
- WebAssemblyMemory.cpp
- WebAssemblyModule.cpp
- WebAssemblyTable.cpp
- WabtInterface.cpp
+ WASM/WabtInterface.cpp
+ WASM/WasmLibrary.cpp
+ WASM/WebAssembly.cpp
+ WASM/WebAssemblyEnvironment.cpp
+ WASM/WebAssemblyInstance.cpp
+ WASM/WebAssemblyMemory.cpp
+ WASM/WebAssemblyModule.cpp
+ WASM/WebAssemblyTable.cpp
)
endif()
if(CAN_BUILD_WABT)
include_directories(
../../wabt/chakra
+ ./WASM
)
endif()
+include_directories(
+./Array
+./Functions
+./Generators
+./Iterators
+./JSON
+./Regex
+./String
+)
+
set(CRLIB_SOURCE_CODES
ArgumentsObject.cpp
ArgumentsObjectEnumerator.cpp
- DelayFreeArrayBufferHelper.cpp
ArrayBuffer.cpp
- AtomicsOperations.cpp
+ Array/ES5Array.cpp
+ Array/ES5ArrayIndexEnumerator.cpp
+ Array/JavascriptArray.cpp
+ Array/JavascriptArrayIndexEnumerator.cpp
+ Array/JavascriptArrayIndexEnumeratorBase.cpp
+ Array/JavascriptArrayIndexSnapshotEnumerator.cpp
+ Array/SparseArraySegment.cpp
+ Array/TypedArray.cpp
+ Array/TypedArrayIndexEnumerator.cpp
AtomicsObject.cpp
- BoundFunction.cpp
- BufferStringBuilder.cpp
+ AtomicsOperations.cpp
CommonExternalApiImpl.cpp
- CompoundString.cpp
- ConcatString.cpp
CustomExternalWrapperObject.cpp
DataView.cpp
DateImplementation.cpp
- ES5Array.cpp
- ES5ArrayIndexEnumerator.cpp
+ DelayFreeArrayBufferHelper.cpp
EngineInterfaceObject.cpp
ExternalLibraryBase.cpp
ForInObjectEnumerator.cpp
+ Functions/BoundFunction.cpp
+ Functions/JavascriptExternalFunction.cpp
+ Functions/JavascriptFunction.cpp
+ Functions/RuntimeFunction.cpp
+ Functions/ScriptFunction.cpp
+ Functions/StackScriptFunction.cpp
+ Generators/JavascriptAsyncFunction.cpp
+ Generators/JavascriptAsyncGenerator.cpp
+ Generators/JavascriptAsyncGeneratorFunction.cpp
+ Generators/JavascriptGenerator.cpp
+ Generators/JavascriptGeneratorFunction.cpp
GlobalObject.cpp
IntlEngineInterfaceExtensionObject.cpp
- JSON.cpp
- JSONParser.cpp
- JSONScanner.cpp
- JSONStack.cpp
- JSONStringBuilder.cpp
- JSONStringifier.cpp
- JavascriptArray.cpp
- JavascriptArrayIndexEnumerator.cpp
- JavascriptArrayIndexEnumeratorBase.cpp
- JavascriptArrayIndexSnapshotEnumerator.cpp
- JavascriptArrayIterator.cpp
- JavascriptAsyncFromSyncIterator.cpp
- JavascriptAsyncFunction.cpp
- JavascriptAsyncGenerator.cpp
- JavascriptAsyncGeneratorFunction.cpp
+ Iterators/CustomExternalIterator.cpp
+ Iterators/JavascriptArrayIterator.cpp
+ Iterators/JavascriptAsyncFromSyncIterator.cpp
+ Iterators/JavascriptIterator.cpp
+ Iterators/JavascriptListIterator.cpp
+ Iterators/JavascriptMapIterator.cpp
+ Iterators/JavascriptSetIterator.cpp
+ JSON/JSON.cpp
+ JSON/JSONParser.cpp
+ JSON/JSONScanner.cpp
+ JSON/JSONStack.cpp
+ JSON/JSONStringBuilder.cpp
+ JSON/JSONStringifier.cpp
+ JSON/LazyJSONString.cpp
+ JavascriptBigInt.cpp
+ JavascriptBigIntObject.cpp
JavascriptBoolean.cpp
JavascriptBooleanObject.cpp
JavascriptBuiltInFunctions.cpp
JavascriptDate.cpp
JavascriptError.cpp
- # JavascriptErrorDebug.cpp
JavascriptExceptionMetadata.cpp
- JavascriptExternalFunction.cpp
- JavascriptFunction.cpp
- JavascriptGenerator.cpp
- JavascriptGeneratorFunction.cpp
- JavascriptIterator.cpp
JavascriptLibrary.cpp
- JavascriptListIterator.cpp
JavascriptMap.cpp
- JavascriptMapIterator.cpp
JavascriptNumber.cpp
JavascriptNumberObject.cpp
JavascriptObject.cpp
JavascriptPromise.cpp
JavascriptProxy.cpp
JavascriptReflect.cpp
- JavascriptRegExpConstructor.cpp
- JavascriptRegExpEnumerator.cpp
- JavascriptRegularExpression.cpp
- JavascriptRegularExpressionResult.cpp
JavascriptSet.cpp
- JavascriptSetIterator.cpp
- JavascriptString.cpp
- JavascriptStringEnumerator.cpp
- JavascriptStringIterator.cpp
- JavascriptStringObject.cpp
- JavascriptBigInt.cpp
- JavascriptBigIntObject.cpp
JavascriptSymbol.cpp
JavascriptSymbolObject.cpp
JavascriptTypedNumber.cpp
JavascriptWeakMap.cpp
JavascriptWeakSet.cpp
JsBuiltInEngineInterfaceExtensionObject.cpp
- LazyJSONString.cpp
- LiteralString.cpp
MathLibrary.cpp
ModuleRoot.cpp
ObjectPrototypeObject.cpp
- ProfileString.cpp
PropertyRecordUsageCache.cpp
- PropertyString.cpp
- RegexHelper.cpp
+ Regex/JavascriptRegExpConstructor.cpp
+ Regex/JavascriptRegExpEnumerator.cpp
+ Regex/JavascriptRegularExpression.cpp
+ Regex/JavascriptRegularExpressionResult.cpp
+ Regex/RegexHelper.cpp
RootObjectBase.cpp
- RuntimeFunction.cpp
RuntimeLibraryPch.cpp
- ScriptFunction.cpp
SharedArrayBuffer.cpp
- SingleCharString.cpp
- SparseArraySegment.cpp
- StackScriptFunction.cpp
- StringCopyInfo.cpp
- SubString.cpp
+ String/BufferStringBuilder.cpp
+ String/CompoundString.cpp
+ String/ConcatString.cpp
+ String/JavascriptString.cpp
+ String/JavascriptStringEnumerator.cpp
+ String/JavascriptStringIterator.cpp
+ String/JavascriptStringObject.cpp
+ String/LiteralString.cpp
+ String/ProfileString.cpp
+ String/PropertyString.cpp
+ String/SingleCharString.cpp
+ String/StringCopyInfo.cpp
+ String/SubString.cpp
ThrowErrorObject.cpp
- TypedArray.cpp
- TypedArrayIndexEnumerator.cpp
UriHelper.cpp
VerifyMarkFalseReference.cpp
${Wasm_dep}
diff --git a/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj b/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj
index dd7d62fc90f..302a6daaef3 100644
--- a/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj
+++ b/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj
@@ -33,6 +33,13 @@
$(MSBuildThisFileDirectory)..\..\wabt\chakra;
$(MSBuildThisFileDirectory)..\..\Runtime\ByteCode;
$(MSBuildThisFileDirectory)..\..\JITClient;
+ $(MSBuildThisFileDirectory)Array;
+ $(MSBuildThisFileDirectory)Functions;
+ $(MSBuildThisFileDirectory)Iterators;
+ $(MSBuildThisFileDirectory)JSON;
+ $(MSBuildThisFileDirectory)Regex;
+ $(MSBuildThisFileDirectory)String;
+ $(MSBuildThisFileDirectory)WASM;
$(ChakraJITIDLIntDir);
$(MSBuildThisFileDirectory)..\Math;
$(ChakraManifestsIncludeDirectory);
@@ -45,116 +52,116 @@
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
Create
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj.filters b/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj.filters
index 5033d74374f..e8a3793d57a 100644
--- a/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj.filters
+++ b/lib/Runtime/Library/Chakra.Runtime.Library.vcxproj.filters
@@ -1,114 +1,114 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -242,14 +242,14 @@
-
+
-
-
+
+
-
+
amd64
diff --git a/lib/Runtime/Library/BoundFunction.cpp b/lib/Runtime/Library/Functions/BoundFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/BoundFunction.cpp
rename to lib/Runtime/Library/Functions/BoundFunction.cpp
diff --git a/lib/Runtime/Library/BoundFunction.h b/lib/Runtime/Library/Functions/BoundFunction.h
similarity index 100%
rename from lib/Runtime/Library/BoundFunction.h
rename to lib/Runtime/Library/Functions/BoundFunction.h
diff --git a/lib/Runtime/Library/JavascriptExternalFunction.cpp b/lib/Runtime/Library/Functions/JavascriptExternalFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptExternalFunction.cpp
rename to lib/Runtime/Library/Functions/JavascriptExternalFunction.cpp
diff --git a/lib/Runtime/Library/JavascriptExternalFunction.h b/lib/Runtime/Library/Functions/JavascriptExternalFunction.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptExternalFunction.h
rename to lib/Runtime/Library/Functions/JavascriptExternalFunction.h
diff --git a/lib/Runtime/Library/JavascriptFunction.cpp b/lib/Runtime/Library/Functions/JavascriptFunction.cpp
similarity index 99%
rename from lib/Runtime/Library/JavascriptFunction.cpp
rename to lib/Runtime/Library/Functions/JavascriptFunction.cpp
index f92a56be862..992c3b1f7af 100644
--- a/lib/Runtime/Library/JavascriptFunction.cpp
+++ b/lib/Runtime/Library/Functions/JavascriptFunction.cpp
@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
#include "Types/SpreadArgument.h"
#include "Language/AsmJsTypes.h"
diff --git a/lib/Runtime/Library/JavascriptFunction.h b/lib/Runtime/Library/Functions/JavascriptFunction.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptFunction.h
rename to lib/Runtime/Library/Functions/JavascriptFunction.h
diff --git a/lib/Runtime/Library/RuntimeFunction.cpp b/lib/Runtime/Library/Functions/RuntimeFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/RuntimeFunction.cpp
rename to lib/Runtime/Library/Functions/RuntimeFunction.cpp
diff --git a/lib/Runtime/Library/RuntimeFunction.h b/lib/Runtime/Library/Functions/RuntimeFunction.h
similarity index 100%
rename from lib/Runtime/Library/RuntimeFunction.h
rename to lib/Runtime/Library/Functions/RuntimeFunction.h
diff --git a/lib/Runtime/Library/ScriptFunction.cpp b/lib/Runtime/Library/Functions/ScriptFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/ScriptFunction.cpp
rename to lib/Runtime/Library/Functions/ScriptFunction.cpp
diff --git a/lib/Runtime/Library/ScriptFunction.h b/lib/Runtime/Library/Functions/ScriptFunction.h
similarity index 100%
rename from lib/Runtime/Library/ScriptFunction.h
rename to lib/Runtime/Library/Functions/ScriptFunction.h
diff --git a/lib/Runtime/Library/StackScriptFunction.cpp b/lib/Runtime/Library/Functions/StackScriptFunction.cpp
similarity index 99%
rename from lib/Runtime/Library/StackScriptFunction.cpp
rename to lib/Runtime/Library/Functions/StackScriptFunction.cpp
index 96df65590bb..855abda5c74 100644
--- a/lib/Runtime/Library/StackScriptFunction.cpp
+++ b/lib/Runtime/Library/Functions/StackScriptFunction.cpp
@@ -5,7 +5,7 @@
#include "RuntimeLibraryPch.h"
#include "Language/JavascriptFunctionArgIndex.h"
#include "Language/InterpreterStackFrame.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
namespace Js
{
diff --git a/lib/Runtime/Library/StackScriptFunction.h b/lib/Runtime/Library/Functions/StackScriptFunction.h
similarity index 100%
rename from lib/Runtime/Library/StackScriptFunction.h
rename to lib/Runtime/Library/Functions/StackScriptFunction.h
diff --git a/lib/Runtime/Library/JavascriptAsyncFunction.cpp b/lib/Runtime/Library/Generators/JavascriptAsyncFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncFunction.cpp
rename to lib/Runtime/Library/Generators/JavascriptAsyncFunction.cpp
diff --git a/lib/Runtime/Library/JavascriptAsyncFunction.h b/lib/Runtime/Library/Generators/JavascriptAsyncFunction.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncFunction.h
rename to lib/Runtime/Library/Generators/JavascriptAsyncFunction.h
diff --git a/lib/Runtime/Library/JavascriptAsyncGenerator.cpp b/lib/Runtime/Library/Generators/JavascriptAsyncGenerator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncGenerator.cpp
rename to lib/Runtime/Library/Generators/JavascriptAsyncGenerator.cpp
diff --git a/lib/Runtime/Library/JavascriptAsyncGenerator.h b/lib/Runtime/Library/Generators/JavascriptAsyncGenerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncGenerator.h
rename to lib/Runtime/Library/Generators/JavascriptAsyncGenerator.h
diff --git a/lib/Runtime/Library/JavascriptAsyncGeneratorFunction.cpp b/lib/Runtime/Library/Generators/JavascriptAsyncGeneratorFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncGeneratorFunction.cpp
rename to lib/Runtime/Library/Generators/JavascriptAsyncGeneratorFunction.cpp
diff --git a/lib/Runtime/Library/JavascriptAsyncGeneratorFunction.h b/lib/Runtime/Library/Generators/JavascriptAsyncGeneratorFunction.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncGeneratorFunction.h
rename to lib/Runtime/Library/Generators/JavascriptAsyncGeneratorFunction.h
diff --git a/lib/Runtime/Library/JavascriptGenerator.cpp b/lib/Runtime/Library/Generators/JavascriptGenerator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptGenerator.cpp
rename to lib/Runtime/Library/Generators/JavascriptGenerator.cpp
diff --git a/lib/Runtime/Library/JavascriptGenerator.h b/lib/Runtime/Library/Generators/JavascriptGenerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptGenerator.h
rename to lib/Runtime/Library/Generators/JavascriptGenerator.h
diff --git a/lib/Runtime/Library/JavascriptGeneratorFunction.cpp b/lib/Runtime/Library/Generators/JavascriptGeneratorFunction.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptGeneratorFunction.cpp
rename to lib/Runtime/Library/Generators/JavascriptGeneratorFunction.cpp
diff --git a/lib/Runtime/Library/JavascriptGeneratorFunction.h b/lib/Runtime/Library/Generators/JavascriptGeneratorFunction.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptGeneratorFunction.h
rename to lib/Runtime/Library/Generators/JavascriptGeneratorFunction.h
diff --git a/lib/Runtime/Library/CustomExternalIterator.cpp b/lib/Runtime/Library/Iterators/CustomExternalIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/CustomExternalIterator.cpp
rename to lib/Runtime/Library/Iterators/CustomExternalIterator.cpp
diff --git a/lib/Runtime/Library/CustomExternalIterator.h b/lib/Runtime/Library/Iterators/CustomExternalIterator.h
similarity index 100%
rename from lib/Runtime/Library/CustomExternalIterator.h
rename to lib/Runtime/Library/Iterators/CustomExternalIterator.h
diff --git a/lib/Runtime/Library/JavascriptArrayIterator.cpp b/lib/Runtime/Library/Iterators/JavascriptArrayIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIterator.cpp
rename to lib/Runtime/Library/Iterators/JavascriptArrayIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptArrayIterator.h b/lib/Runtime/Library/Iterators/JavascriptArrayIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptArrayIterator.h
rename to lib/Runtime/Library/Iterators/JavascriptArrayIterator.h
diff --git a/lib/Runtime/Library/JavascriptAsyncFromSyncIterator.cpp b/lib/Runtime/Library/Iterators/JavascriptAsyncFromSyncIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncFromSyncIterator.cpp
rename to lib/Runtime/Library/Iterators/JavascriptAsyncFromSyncIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptAsyncFromSyncIterator.h b/lib/Runtime/Library/Iterators/JavascriptAsyncFromSyncIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptAsyncFromSyncIterator.h
rename to lib/Runtime/Library/Iterators/JavascriptAsyncFromSyncIterator.h
diff --git a/lib/Runtime/Library/JavascriptIterator.cpp b/lib/Runtime/Library/Iterators/JavascriptIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptIterator.cpp
rename to lib/Runtime/Library/Iterators/JavascriptIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptIterator.h b/lib/Runtime/Library/Iterators/JavascriptIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptIterator.h
rename to lib/Runtime/Library/Iterators/JavascriptIterator.h
diff --git a/lib/Runtime/Library/JavascriptListIterator.cpp b/lib/Runtime/Library/Iterators/JavascriptListIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptListIterator.cpp
rename to lib/Runtime/Library/Iterators/JavascriptListIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptListIterator.h b/lib/Runtime/Library/Iterators/JavascriptListIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptListIterator.h
rename to lib/Runtime/Library/Iterators/JavascriptListIterator.h
diff --git a/lib/Runtime/Library/JavascriptMapIterator.cpp b/lib/Runtime/Library/Iterators/JavascriptMapIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptMapIterator.cpp
rename to lib/Runtime/Library/Iterators/JavascriptMapIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptMapIterator.h b/lib/Runtime/Library/Iterators/JavascriptMapIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptMapIterator.h
rename to lib/Runtime/Library/Iterators/JavascriptMapIterator.h
diff --git a/lib/Runtime/Library/JavascriptSetIterator.cpp b/lib/Runtime/Library/Iterators/JavascriptSetIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptSetIterator.cpp
rename to lib/Runtime/Library/Iterators/JavascriptSetIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptSetIterator.h b/lib/Runtime/Library/Iterators/JavascriptSetIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptSetIterator.h
rename to lib/Runtime/Library/Iterators/JavascriptSetIterator.h
diff --git a/lib/Runtime/Library/JSON.cpp b/lib/Runtime/Library/JSON/JSON.cpp
similarity index 98%
rename from lib/Runtime/Library/JSON.cpp
rename to lib/Runtime/Library/JSON/JSON.cpp
index c1ce141ceeb..e55ab78e20c 100644
--- a/lib/Runtime/Library/JSON.cpp
+++ b/lib/Runtime/Library/JSON/JSON.cpp
@@ -3,9 +3,9 @@
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "Library/JSONStack.h"
-#include "Library/JSONParser.h"
-#include "Library/JSON.h"
+#include "Library/JSON/JSONStack.h"
+#include "Library/JSON/JSONParser.h"
+#include "Library/JSON/JSON.h"
using namespace Js;
diff --git a/lib/Runtime/Library/JSON.h b/lib/Runtime/Library/JSON/JSON.h
similarity index 100%
rename from lib/Runtime/Library/JSON.h
rename to lib/Runtime/Library/JSON/JSON.h
diff --git a/lib/Runtime/Library/JSONParser.cpp b/lib/Runtime/Library/JSON/JSONParser.cpp
similarity index 99%
rename from lib/Runtime/Library/JSONParser.cpp
rename to lib/Runtime/Library/JSON/JSONParser.cpp
index 991fb21b54a..424b903824b 100644
--- a/lib/Runtime/Library/JSONParser.cpp
+++ b/lib/Runtime/Library/JSON/JSONParser.cpp
@@ -1,10 +1,11 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "JSON.h"
-#include "JSONParser.h"
+#include "Library/JSON/JSON.h"
+#include "Library/JSON/JSONParser.h"
using namespace Js;
diff --git a/lib/Runtime/Library/JSONParser.h b/lib/Runtime/Library/JSON/JSONParser.h
similarity index 96%
rename from lib/Runtime/Library/JSONParser.h
rename to lib/Runtime/Library/JSON/JSONParser.h
index a1687d2b922..4044d1e6b44 100644
--- a/lib/Runtime/Library/JSONParser.h
+++ b/lib/Runtime/Library/JSON/JSONParser.h
@@ -1,9 +1,10 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
-#include "JSONScanner.h"
+#include "Library/JSON/JSONScanner.h"
namespace JSON
{
diff --git a/lib/Runtime/Library/JSONScanner.cpp b/lib/Runtime/Library/JSON/JSONScanner.cpp
similarity index 99%
rename from lib/Runtime/Library/JSONScanner.cpp
rename to lib/Runtime/Library/JSON/JSONScanner.cpp
index dfd63966c9e..5b200f41476 100644
--- a/lib/Runtime/Library/JSONScanner.cpp
+++ b/lib/Runtime/Library/JSON/JSONScanner.cpp
@@ -1,9 +1,10 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "JSONScanner.h"
+#include "Library/JSON/JSONScanner.h"
using namespace Js;
diff --git a/lib/Runtime/Library/JSONScanner.h b/lib/Runtime/Library/JSON/JSONScanner.h
similarity index 100%
rename from lib/Runtime/Library/JSONScanner.h
rename to lib/Runtime/Library/JSON/JSONScanner.h
diff --git a/lib/Runtime/Library/JSONStack.cpp b/lib/Runtime/Library/JSON/JSONStack.cpp
similarity index 96%
rename from lib/Runtime/Library/JSONStack.cpp
rename to lib/Runtime/Library/JSON/JSONStack.cpp
index 95fcdfe34fd..b0e826e3d42 100644
--- a/lib/Runtime/Library/JSONStack.cpp
+++ b/lib/Runtime/Library/JSON/JSONStack.cpp
@@ -1,9 +1,10 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "JSONStack.h"
+#include "Library/JSON/JSONStack.h"
namespace JSON
{
#if defined(_JS_VALUE) || (_DOM_VALUE)
diff --git a/lib/Runtime/Library/JSONStack.h b/lib/Runtime/Library/JSON/JSONStack.h
similarity index 100%
rename from lib/Runtime/Library/JSONStack.h
rename to lib/Runtime/Library/JSON/JSONStack.h
diff --git a/lib/Runtime/Library/JSONStringBuilder.cpp b/lib/Runtime/Library/JSON/JSONStringBuilder.cpp
similarity index 100%
rename from lib/Runtime/Library/JSONStringBuilder.cpp
rename to lib/Runtime/Library/JSON/JSONStringBuilder.cpp
diff --git a/lib/Runtime/Library/JSONStringBuilder.h b/lib/Runtime/Library/JSON/JSONStringBuilder.h
similarity index 100%
rename from lib/Runtime/Library/JSONStringBuilder.h
rename to lib/Runtime/Library/JSON/JSONStringBuilder.h
diff --git a/lib/Runtime/Library/JSONStringifier.cpp b/lib/Runtime/Library/JSON/JSONStringifier.cpp
similarity index 100%
rename from lib/Runtime/Library/JSONStringifier.cpp
rename to lib/Runtime/Library/JSON/JSONStringifier.cpp
diff --git a/lib/Runtime/Library/JSONStringifier.h b/lib/Runtime/Library/JSON/JSONStringifier.h
similarity index 100%
rename from lib/Runtime/Library/JSONStringifier.h
rename to lib/Runtime/Library/JSON/JSONStringifier.h
diff --git a/lib/Runtime/Library/LazyJSONString.cpp b/lib/Runtime/Library/JSON/LazyJSONString.cpp
similarity index 100%
rename from lib/Runtime/Library/LazyJSONString.cpp
rename to lib/Runtime/Library/JSON/LazyJSONString.cpp
diff --git a/lib/Runtime/Library/LazyJSONString.h b/lib/Runtime/Library/JSON/LazyJSONString.h
similarity index 100%
rename from lib/Runtime/Library/LazyJSONString.h
rename to lib/Runtime/Library/JSON/LazyJSONString.h
diff --git a/lib/Runtime/Library/JavascriptBuiltInFunctions.cpp b/lib/Runtime/Library/JavascriptBuiltInFunctions.cpp
index f41dc0a3b8d..4efcdc540d3 100644
--- a/lib/Runtime/Library/JavascriptBuiltInFunctions.cpp
+++ b/lib/Runtime/Library/JavascriptBuiltInFunctions.cpp
@@ -1,9 +1,10 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeLibraryPch.h"
-#include "EngineInterfaceObject.h"
+#include "Library/EngineInterfaceObject.h"
namespace Js
{
diff --git a/lib/Runtime/Library/JavascriptBuiltInFunctions.h b/lib/Runtime/Library/JavascriptBuiltInFunctions.h
index 485632b4dd1..8c6f018c680 100644
--- a/lib/Runtime/Library/JavascriptBuiltInFunctions.h
+++ b/lib/Runtime/Library/JavascriptBuiltInFunctions.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
diff --git a/lib/Runtime/Library/JavascriptLibrary.cpp b/lib/Runtime/Library/JavascriptLibrary.cpp
index 400c7090e61..614dad125bd 100644
--- a/lib/Runtime/Library/JavascriptLibrary.cpp
+++ b/lib/Runtime/Library/JavascriptLibrary.cpp
@@ -6,7 +6,7 @@
#include "RuntimeLibraryPch.h"
-#include "Library/JSON.h"
+#include "Library/JSON/JSON.h"
#include "Types/MissingPropertyTypeHandler.h"
#include "Types/NullTypeHandler.h"
#include "Types/SimpleTypeHandler.h"
@@ -23,7 +23,7 @@
#include "Library/JsBuiltInEngineInterfaceExtensionObject.h"
#endif
#include "Library/ThrowErrorObject.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
namespace Js
{
diff --git a/lib/Runtime/Library/JavascriptLibrary.h b/lib/Runtime/Library/JavascriptLibrary.h
index aed0f780a28..c5f54cdc0ec 100644
--- a/lib/Runtime/Library/JavascriptLibrary.h
+++ b/lib/Runtime/Library/JavascriptLibrary.h
@@ -13,9 +13,9 @@
#define PreInitializedObjectTypeCount ((MaxPreInitializedObjectTypeInlineSlotCount / InlineSlotCountIncrement) + 1)
CompileAssert(MaxPreInitializedObjectTypeInlineSlotCount <= USHRT_MAX);
-#include "StringCache.h"
-#include "Library/JavascriptGenerator.h"
-#include "Library/JavascriptAsyncGenerator.h"
+#include "Library/String/StringCache.h"
+#include "Library/Generators/JavascriptGenerator.h"
+#include "Library/Generators/JavascriptAsyncGenerator.h"
class ScriptSite;
class ActiveScriptExternalLibrary;
@@ -606,7 +606,7 @@ namespace Js
#define STRING(name, str) JavascriptString* Get##name##String() { return stringCache.Get##name(); }
#define PROPERTY_STRING(name, str) STRING(name, str)
-#include "StringCacheList.h"
+#include "Library/String/StringCacheList.h"
#undef PROPERTY_STRING
#undef STRING
diff --git a/lib/Runtime/Library/JavascriptRegExpConstructor.cpp b/lib/Runtime/Library/Regex/JavascriptRegExpConstructor.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegExpConstructor.cpp
rename to lib/Runtime/Library/Regex/JavascriptRegExpConstructor.cpp
diff --git a/lib/Runtime/Library/JavascriptRegExpConstructor.h b/lib/Runtime/Library/Regex/JavascriptRegExpConstructor.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegExpConstructor.h
rename to lib/Runtime/Library/Regex/JavascriptRegExpConstructor.h
diff --git a/lib/Runtime/Library/JavascriptRegExpEnumerator.cpp b/lib/Runtime/Library/Regex/JavascriptRegExpEnumerator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegExpEnumerator.cpp
rename to lib/Runtime/Library/Regex/JavascriptRegExpEnumerator.cpp
diff --git a/lib/Runtime/Library/JavascriptRegExpEnumerator.h b/lib/Runtime/Library/Regex/JavascriptRegExpEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegExpEnumerator.h
rename to lib/Runtime/Library/Regex/JavascriptRegExpEnumerator.h
diff --git a/lib/Runtime/Library/JavascriptRegularExpression.cpp b/lib/Runtime/Library/Regex/JavascriptRegularExpression.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegularExpression.cpp
rename to lib/Runtime/Library/Regex/JavascriptRegularExpression.cpp
diff --git a/lib/Runtime/Library/JavascriptRegularExpression.h b/lib/Runtime/Library/Regex/JavascriptRegularExpression.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegularExpression.h
rename to lib/Runtime/Library/Regex/JavascriptRegularExpression.h
diff --git a/lib/Runtime/Library/JavascriptRegularExpressionResult.cpp b/lib/Runtime/Library/Regex/JavascriptRegularExpressionResult.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegularExpressionResult.cpp
rename to lib/Runtime/Library/Regex/JavascriptRegularExpressionResult.cpp
diff --git a/lib/Runtime/Library/JavascriptRegularExpressionResult.h b/lib/Runtime/Library/Regex/JavascriptRegularExpressionResult.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptRegularExpressionResult.h
rename to lib/Runtime/Library/Regex/JavascriptRegularExpressionResult.h
diff --git a/lib/Runtime/Library/RegexHelper.cpp b/lib/Runtime/Library/Regex/RegexHelper.cpp
similarity index 100%
rename from lib/Runtime/Library/RegexHelper.cpp
rename to lib/Runtime/Library/Regex/RegexHelper.cpp
diff --git a/lib/Runtime/Library/RegexHelper.h b/lib/Runtime/Library/Regex/RegexHelper.h
similarity index 100%
rename from lib/Runtime/Library/RegexHelper.h
rename to lib/Runtime/Library/Regex/RegexHelper.h
diff --git a/lib/Runtime/Library/RuntimeLibraryPch.h b/lib/Runtime/Library/RuntimeLibraryPch.h
index 7fcc9891470..d2b6cb37579 100644
--- a/lib/Runtime/Library/RuntimeLibraryPch.h
+++ b/lib/Runtime/Library/RuntimeLibraryPch.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
@@ -12,7 +13,7 @@
#include "Base/EtwTrace.h"
#include "Library/JavascriptNumberObject.h"
-#include "Library/JavascriptStringObject.h"
+#include "Library/String/JavascriptStringObject.h"
#include "Library/JavascriptBooleanObject.h"
#include "Library/JavascriptBigIntObject.h"
@@ -21,25 +22,25 @@
#include "Common/ByteSwap.h"
#include "Library/DataView.h"
-#include "Library/LazyJSONString.h"
-#include "Library/JSONStringBuilder.h"
-#include "Library/JSONStringifier.h"
-#include "Library/ProfileString.h"
-#include "Library/SingleCharString.h"
-#include "Library/SubString.h"
-#include "Library/BufferStringBuilder.h"
-
-#include "Library/BoundFunction.h"
-#include "Library/JavascriptGeneratorFunction.h"
-#include "Library/JavascriptAsyncFunction.h"
-#include "Library/JavascriptAsyncGeneratorFunction.h"
-
-#include "Library/RegexHelper.h"
-#include "Library/JavascriptRegularExpression.h"
-#include "Library/JavascriptRegExpConstructor.h"
-#include "Library/JavascriptRegularExpressionResult.h"
-
-#include "Library/JavascriptAsyncFromSyncIterator.h"
+#include "Library/JSON/LazyJSONString.h"
+#include "Library/JSON/JSONStringBuilder.h"
+#include "Library/JSON/JSONStringifier.h"
+#include "Library/String/ProfileString.h"
+#include "Library/String/SingleCharString.h"
+#include "Library/String/SubString.h"
+#include "Library/String/BufferStringBuilder.h"
+
+#include "Library/Functions/BoundFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptAsyncFunction.h"
+#include "Library/Generators/JavascriptAsyncGeneratorFunction.h"
+
+#include "Library/Regex/RegexHelper.h"
+#include "Library/Regex/JavascriptRegularExpression.h"
+#include "Library/Regex/JavascriptRegExpConstructor.h"
+#include "Library/Regex/JavascriptRegularExpressionResult.h"
+
+#include "Library/Iterators/JavascriptAsyncFromSyncIterator.h"
#include "Library/JavascriptPromise.h"
#include "Library/JavascriptSymbolObject.h"
#ifdef _CHAKRACOREBUILD
@@ -47,8 +48,8 @@
#endif
#include "Library/JavascriptProxy.h"
#include "Library/JavascriptReflect.h"
-#include "Library/JavascriptGenerator.h"
-#include "Library/JavascriptAsyncGenerator.h"
+#include "Library/Generators/JavascriptGenerator.h"
+#include "Library/Generators/JavascriptAsyncGenerator.h"
#include "Library/SameValueComparer.h"
#include "Library/MapOrSetDataList.h"
@@ -62,24 +63,24 @@
#include "Types/DictionaryPropertyDescriptor.h"
#include "Types/DictionaryTypeHandler.h"
#include "Types/ES5ArrayTypeHandler.h"
-#include "Library/ES5Array.h"
-
-#include "Library/JavascriptArrayIndexEnumeratorBase.h"
-#include "Library/JavascriptArrayIndexEnumerator.h"
-#include "Library/JavascriptArrayIndexSnapshotEnumerator.h"
-#include "Library/JavascriptArrayIndexStaticEnumerator.h"
-#include "Library/ES5ArrayIndexEnumerator.h"
-#include "Library/ES5ArrayIndexStaticEnumerator.h"
-#include "Library/TypedArrayIndexEnumerator.h"
-#include "Library/JavascriptStringEnumerator.h"
-#include "Library/JavascriptRegExpEnumerator.h"
-
-#include "Library/JavascriptIterator.h"
-#include "Library/JavascriptArrayIterator.h"
-#include "Library/JavascriptMapIterator.h"
-#include "Library/JavascriptSetIterator.h"
-#include "Library/JavascriptStringIterator.h"
-#include "Library/JavascriptListIterator.h"
+#include "Library/Array/ES5Array.h"
+
+#include "Library/Array/JavascriptArrayIndexEnumeratorBase.h"
+#include "Library/Array/JavascriptArrayIndexEnumerator.h"
+#include "Library/Array/JavascriptArrayIndexSnapshotEnumerator.h"
+#include "Library/Array/JavascriptArrayIndexStaticEnumerator.h"
+#include "Library/Array/ES5ArrayIndexEnumerator.h"
+#include "Library/Array/ES5ArrayIndexStaticEnumerator.h"
+#include "Library/Array/TypedArrayIndexEnumerator.h"
+#include "Library/String/JavascriptStringEnumerator.h"
+#include "Library/Regex/JavascriptRegExpEnumerator.h"
+
+#include "Library/Iterators/JavascriptIterator.h"
+#include "Library/Iterators/JavascriptArrayIterator.h"
+#include "Library/Iterators/JavascriptMapIterator.h"
+#include "Library/Iterators/JavascriptSetIterator.h"
+#include "Library/String/JavascriptStringIterator.h"
+#include "Library/Iterators/JavascriptListIterator.h"
#include "Library/UriHelper.h"
#include "Library/HostObjectBase.h"
@@ -92,14 +93,14 @@
// SIMD
#include "Language/SimdOps.h"
-#include "Library/WebAssemblyInstance.h"
+#include "Library/WASM/WebAssemblyInstance.h"
#include "Language/JavascriptStackWalker.h"
#include "Language/CacheOperators.h"
#include "Types/TypePropertyCache.h"
// .inl files
-#include "Library/JavascriptString.inl"
-#include "Library/ConcatString.inl"
+#include "Library/String/JavascriptString.inl"
+#include "Library/String/ConcatString.inl"
#include "Language/CacheOperators.inl"
#endif // !IsJsDiag
diff --git a/lib/Runtime/Library/BufferStringBuilder.cpp b/lib/Runtime/Library/String/BufferStringBuilder.cpp
similarity index 100%
rename from lib/Runtime/Library/BufferStringBuilder.cpp
rename to lib/Runtime/Library/String/BufferStringBuilder.cpp
diff --git a/lib/Runtime/Library/BufferStringBuilder.h b/lib/Runtime/Library/String/BufferStringBuilder.h
similarity index 100%
rename from lib/Runtime/Library/BufferStringBuilder.h
rename to lib/Runtime/Library/String/BufferStringBuilder.h
diff --git a/lib/Runtime/Library/CompoundString.cpp b/lib/Runtime/Library/String/CompoundString.cpp
similarity index 100%
rename from lib/Runtime/Library/CompoundString.cpp
rename to lib/Runtime/Library/String/CompoundString.cpp
diff --git a/lib/Runtime/Library/CompoundString.h b/lib/Runtime/Library/String/CompoundString.h
similarity index 100%
rename from lib/Runtime/Library/CompoundString.h
rename to lib/Runtime/Library/String/CompoundString.h
diff --git a/lib/Runtime/Library/ConcatString.cpp b/lib/Runtime/Library/String/ConcatString.cpp
similarity index 100%
rename from lib/Runtime/Library/ConcatString.cpp
rename to lib/Runtime/Library/String/ConcatString.cpp
diff --git a/lib/Runtime/Library/ConcatString.h b/lib/Runtime/Library/String/ConcatString.h
similarity index 100%
rename from lib/Runtime/Library/ConcatString.h
rename to lib/Runtime/Library/String/ConcatString.h
diff --git a/lib/Runtime/Library/ConcatString.inl b/lib/Runtime/Library/String/ConcatString.inl
similarity index 100%
rename from lib/Runtime/Library/ConcatString.inl
rename to lib/Runtime/Library/String/ConcatString.inl
diff --git a/lib/Runtime/Library/JavascriptString.cpp b/lib/Runtime/Library/String/JavascriptString.cpp
similarity index 99%
rename from lib/Runtime/Library/JavascriptString.cpp
rename to lib/Runtime/Library/String/JavascriptString.cpp
index fca55d4012f..03788b7e0a9 100644
--- a/lib/Runtime/Library/JavascriptString.cpp
+++ b/lib/Runtime/Library/String/JavascriptString.cpp
@@ -3230,7 +3230,7 @@ namespace Js
\
return StringBracketHelper(args, scriptContext, __VA_ARGS__); \
}
-#include "JavascriptStringTagEntries.h"
+#include "Library/String/JavascriptStringTagEntries.h"
#undef TAGENTRY
Var JavascriptString::StringBracketHelper(Arguments args, ScriptContext *scriptContext, __in_ecount(cchTag) char16 const *pszTag,
diff --git a/lib/Runtime/Library/JavascriptString.h b/lib/Runtime/Library/String/JavascriptString.h
similarity index 99%
rename from lib/Runtime/Library/JavascriptString.h
rename to lib/Runtime/Library/String/JavascriptString.h
index 30cc4b60865..9326efd55d9 100644
--- a/lib/Runtime/Library/JavascriptString.h
+++ b/lib/Runtime/Library/String/JavascriptString.h
@@ -257,7 +257,7 @@ namespace Js
#undef TAGENTRY
#endif
#define TAGENTRY(name, ...) static FunctionInfo name;
-#include "JavascriptStringTagEntries.h"
+#include "Library/String/JavascriptStringTagEntries.h"
#undef TAGENTRY
static FunctionInfo ValueOf;
static FunctionInfo SymbolIterator;
diff --git a/lib/Runtime/Library/JavascriptString.inl b/lib/Runtime/Library/String/JavascriptString.inl
similarity index 100%
rename from lib/Runtime/Library/JavascriptString.inl
rename to lib/Runtime/Library/String/JavascriptString.inl
diff --git a/lib/Runtime/Library/JavascriptStringEnumerator.cpp b/lib/Runtime/Library/String/JavascriptStringEnumerator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringEnumerator.cpp
rename to lib/Runtime/Library/String/JavascriptStringEnumerator.cpp
diff --git a/lib/Runtime/Library/JavascriptStringEnumerator.h b/lib/Runtime/Library/String/JavascriptStringEnumerator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringEnumerator.h
rename to lib/Runtime/Library/String/JavascriptStringEnumerator.h
diff --git a/lib/Runtime/Library/JavascriptStringIterator.cpp b/lib/Runtime/Library/String/JavascriptStringIterator.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringIterator.cpp
rename to lib/Runtime/Library/String/JavascriptStringIterator.cpp
diff --git a/lib/Runtime/Library/JavascriptStringIterator.h b/lib/Runtime/Library/String/JavascriptStringIterator.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringIterator.h
rename to lib/Runtime/Library/String/JavascriptStringIterator.h
diff --git a/lib/Runtime/Library/JavascriptStringObject.cpp b/lib/Runtime/Library/String/JavascriptStringObject.cpp
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringObject.cpp
rename to lib/Runtime/Library/String/JavascriptStringObject.cpp
diff --git a/lib/Runtime/Library/JavascriptStringObject.h b/lib/Runtime/Library/String/JavascriptStringObject.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringObject.h
rename to lib/Runtime/Library/String/JavascriptStringObject.h
diff --git a/lib/Runtime/Library/JavascriptStringTagEntries.h b/lib/Runtime/Library/String/JavascriptStringTagEntries.h
similarity index 100%
rename from lib/Runtime/Library/JavascriptStringTagEntries.h
rename to lib/Runtime/Library/String/JavascriptStringTagEntries.h
diff --git a/lib/Runtime/Library/LiteralString.cpp b/lib/Runtime/Library/String/LiteralString.cpp
similarity index 100%
rename from lib/Runtime/Library/LiteralString.cpp
rename to lib/Runtime/Library/String/LiteralString.cpp
diff --git a/lib/Runtime/Library/LiteralString.h b/lib/Runtime/Library/String/LiteralString.h
similarity index 100%
rename from lib/Runtime/Library/LiteralString.h
rename to lib/Runtime/Library/String/LiteralString.h
diff --git a/lib/Runtime/Library/ProfileString.cpp b/lib/Runtime/Library/String/ProfileString.cpp
similarity index 100%
rename from lib/Runtime/Library/ProfileString.cpp
rename to lib/Runtime/Library/String/ProfileString.cpp
diff --git a/lib/Runtime/Library/ProfileString.h b/lib/Runtime/Library/String/ProfileString.h
similarity index 100%
rename from lib/Runtime/Library/ProfileString.h
rename to lib/Runtime/Library/String/ProfileString.h
diff --git a/lib/Runtime/Library/PropertyString.cpp b/lib/Runtime/Library/String/PropertyString.cpp
similarity index 100%
rename from lib/Runtime/Library/PropertyString.cpp
rename to lib/Runtime/Library/String/PropertyString.cpp
diff --git a/lib/Runtime/Library/PropertyString.h b/lib/Runtime/Library/String/PropertyString.h
similarity index 100%
rename from lib/Runtime/Library/PropertyString.h
rename to lib/Runtime/Library/String/PropertyString.h
diff --git a/lib/Runtime/Library/SingleCharString.cpp b/lib/Runtime/Library/String/SingleCharString.cpp
similarity index 100%
rename from lib/Runtime/Library/SingleCharString.cpp
rename to lib/Runtime/Library/String/SingleCharString.cpp
diff --git a/lib/Runtime/Library/SingleCharString.h b/lib/Runtime/Library/String/SingleCharString.h
similarity index 100%
rename from lib/Runtime/Library/SingleCharString.h
rename to lib/Runtime/Library/String/SingleCharString.h
diff --git a/lib/Runtime/Library/StringCache.h b/lib/Runtime/Library/String/StringCache.h
similarity index 94%
rename from lib/Runtime/Library/StringCache.h
rename to lib/Runtime/Library/String/StringCache.h
index 0e703b64503..d9d8cd9f727 100644
--- a/lib/Runtime/Library/StringCache.h
+++ b/lib/Runtime/Library/String/StringCache.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
@@ -18,7 +19,7 @@ class StringCache
// NOTE: the trailing comma is important!
#define STRING(name, str) __##name(nullptr),
#define PROPERTY_STRING(name, str) STRING(name, str)
-#include "StringCacheList.h"
+#include "Library/String/StringCacheList.h"
#undef PROPERTY_STRING
#undef STRING
scriptContext(nullptr),
@@ -52,7 +53,7 @@ public: \
}
#define STRING(name, str) INITIALIZE(name, str, false)
#define PROPERTY_STRING(name, str) INITIALIZE(name, str, true)
-#include "StringCacheList.h"
+#include "Library/String/StringCacheList.h"
#undef PROPERTY_STRING
#undef STRING
#undef INITIALIZE
diff --git a/lib/Runtime/Library/StringCacheList.h b/lib/Runtime/Library/String/StringCacheList.h
similarity index 100%
rename from lib/Runtime/Library/StringCacheList.h
rename to lib/Runtime/Library/String/StringCacheList.h
diff --git a/lib/Runtime/Library/StringCopyInfo.cpp b/lib/Runtime/Library/String/StringCopyInfo.cpp
similarity index 100%
rename from lib/Runtime/Library/StringCopyInfo.cpp
rename to lib/Runtime/Library/String/StringCopyInfo.cpp
diff --git a/lib/Runtime/Library/StringCopyInfo.h b/lib/Runtime/Library/String/StringCopyInfo.h
similarity index 100%
rename from lib/Runtime/Library/StringCopyInfo.h
rename to lib/Runtime/Library/String/StringCopyInfo.h
diff --git a/lib/Runtime/Library/SubString.cpp b/lib/Runtime/Library/String/SubString.cpp
similarity index 100%
rename from lib/Runtime/Library/SubString.cpp
rename to lib/Runtime/Library/String/SubString.cpp
diff --git a/lib/Runtime/Library/SubString.h b/lib/Runtime/Library/String/SubString.h
similarity index 100%
rename from lib/Runtime/Library/SubString.h
rename to lib/Runtime/Library/String/SubString.h
diff --git a/lib/Runtime/Library/WabtInterface.cpp b/lib/Runtime/Library/WASM/WabtInterface.cpp
similarity index 100%
rename from lib/Runtime/Library/WabtInterface.cpp
rename to lib/Runtime/Library/WASM/WabtInterface.cpp
diff --git a/lib/Runtime/Library/WabtInterface.h b/lib/Runtime/Library/WASM/WabtInterface.h
similarity index 100%
rename from lib/Runtime/Library/WabtInterface.h
rename to lib/Runtime/Library/WASM/WabtInterface.h
diff --git a/lib/Runtime/Library/WasmLibrary.cpp b/lib/Runtime/Library/WASM/WasmLibrary.cpp
similarity index 100%
rename from lib/Runtime/Library/WasmLibrary.cpp
rename to lib/Runtime/Library/WASM/WasmLibrary.cpp
diff --git a/lib/Runtime/Library/WasmLibrary.h b/lib/Runtime/Library/WASM/WasmLibrary.h
similarity index 100%
rename from lib/Runtime/Library/WasmLibrary.h
rename to lib/Runtime/Library/WASM/WasmLibrary.h
diff --git a/lib/Runtime/Library/WebAssembly.cpp b/lib/Runtime/Library/WASM/WebAssembly.cpp
similarity index 100%
rename from lib/Runtime/Library/WebAssembly.cpp
rename to lib/Runtime/Library/WASM/WebAssembly.cpp
diff --git a/lib/Runtime/Library/WebAssembly.h b/lib/Runtime/Library/WASM/WebAssembly.h
similarity index 100%
rename from lib/Runtime/Library/WebAssembly.h
rename to lib/Runtime/Library/WASM/WebAssembly.h
diff --git a/lib/Runtime/Library/WebAssemblyEnvironment.cpp b/lib/Runtime/Library/WASM/WebAssemblyEnvironment.cpp
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyEnvironment.cpp
rename to lib/Runtime/Library/WASM/WebAssemblyEnvironment.cpp
diff --git a/lib/Runtime/Library/WebAssemblyEnvironment.h b/lib/Runtime/Library/WASM/WebAssemblyEnvironment.h
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyEnvironment.h
rename to lib/Runtime/Library/WASM/WebAssemblyEnvironment.h
diff --git a/lib/Runtime/Library/WebAssemblyInstance.cpp b/lib/Runtime/Library/WASM/WebAssemblyInstance.cpp
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyInstance.cpp
rename to lib/Runtime/Library/WASM/WebAssemblyInstance.cpp
diff --git a/lib/Runtime/Library/WebAssemblyInstance.h b/lib/Runtime/Library/WASM/WebAssemblyInstance.h
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyInstance.h
rename to lib/Runtime/Library/WASM/WebAssemblyInstance.h
diff --git a/lib/Runtime/Library/WebAssemblyMemory.cpp b/lib/Runtime/Library/WASM/WebAssemblyMemory.cpp
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyMemory.cpp
rename to lib/Runtime/Library/WASM/WebAssemblyMemory.cpp
diff --git a/lib/Runtime/Library/WebAssemblyMemory.h b/lib/Runtime/Library/WASM/WebAssemblyMemory.h
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyMemory.h
rename to lib/Runtime/Library/WASM/WebAssemblyMemory.h
diff --git a/lib/Runtime/Library/WebAssemblyModule.cpp b/lib/Runtime/Library/WASM/WebAssemblyModule.cpp
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyModule.cpp
rename to lib/Runtime/Library/WASM/WebAssemblyModule.cpp
diff --git a/lib/Runtime/Library/WebAssemblyModule.h b/lib/Runtime/Library/WASM/WebAssemblyModule.h
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyModule.h
rename to lib/Runtime/Library/WASM/WebAssemblyModule.h
diff --git a/lib/Runtime/Library/WebAssemblyTable.cpp b/lib/Runtime/Library/WASM/WebAssemblyTable.cpp
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyTable.cpp
rename to lib/Runtime/Library/WASM/WebAssemblyTable.cpp
diff --git a/lib/Runtime/Library/WebAssemblyTable.h b/lib/Runtime/Library/WASM/WebAssemblyTable.h
similarity index 100%
rename from lib/Runtime/Library/WebAssemblyTable.h
rename to lib/Runtime/Library/WASM/WebAssemblyTable.h
diff --git a/lib/Runtime/Runtime.h b/lib/Runtime/Runtime.h
index d60ce8ba50a..c5f00cf5826 100644
--- a/lib/Runtime/Runtime.h
+++ b/lib/Runtime/Runtime.h
@@ -428,16 +428,16 @@ enum tagDEBUG_EVENT_INFO_TYPE
#include "ByteCode/ByteBlock.h"
#include "Library/JavascriptBuiltInFunctions.h"
-#include "Library/JavascriptString.h"
-#include "Library/StringCopyInfo.h"
+#include "Library/String/JavascriptString.h"
+#include "Library/String/StringCopyInfo.h"
#include "Library/JavascriptNumber.h"
-#include "Library/JavascriptFunction.h"
-#include "Library/BoundFunction.h"
-#include "Library/RuntimeFunction.h"
-#include "Library/JavascriptExternalFunction.h"
-#include "Library/CustomExternalIterator.h"
+#include "Library/Functions/JavascriptFunction.h"
+#include "Library/Functions/BoundFunction.h"
+#include "Library/Functions/RuntimeFunction.h"
+#include "Library/Functions/JavascriptExternalFunction.h"
+#include "Library/Iterators/CustomExternalIterator.h"
#include "Base/CharStringCache.h"
@@ -458,8 +458,8 @@ enum tagDEBUG_EVENT_INFO_TYPE
#include "Language/JavascriptExceptionOperators.h"
#include "Language/JavascriptOperators.h"
-#include "Library/WasmLibrary.h"
-#include "Library/WabtInterface.h"
+#include "Library/WASM/WasmLibrary.h"
+#include "Library/WASM/WabtInterface.h"
// xplat-todo: We should get rid of this altogether and move the functionality it
// encapsulates to the Platform Agnostic Interface
#ifdef _WIN32
@@ -504,38 +504,38 @@ enum tagDEBUG_EVENT_INFO_TYPE
#include "Library/RootObjectBase.h"
#include "Library/GlobalObject.h"
-#include "Library/LiteralString.h"
-#include "Library/ConcatString.h"
-#include "Library/CompoundString.h"
+#include "Library/String/LiteralString.h"
+#include "Library/String/ConcatString.h"
+#include "Library/String/CompoundString.h"
#include "Library/PropertyRecordUsageCache.h"
-#include "Library/PropertyString.h"
-#include "Library/SingleCharString.h"
+#include "Library/String/PropertyString.h"
+#include "Library/String/SingleCharString.h"
#include "Library/JavascriptTypedNumber.h"
-#include "Library/SparseArraySegment.h"
+#include "Library/Array/SparseArraySegment.h"
#include "Library/JavascriptError.h"
-#include "Library/JavascriptArray.h"
+#include "Library/Array/JavascriptArray.h"
#include "Library/JavascriptSymbol.h"
#include "Library/AtomicsObject.h"
#include "DetachedStateBase.h"
#include "Library/ArrayBuffer.h"
#include "Library/SharedArrayBuffer.h"
-#include "Library/TypedArray.h"
+#include "Library/Array/TypedArray.h"
#include "Library/JavascriptBoolean.h"
#include "Library/JavascriptBigInt.h"
-#include "Library/WebAssemblyEnvironment.h"
-#include "Library/WebAssemblyTable.h"
-#include "Library/WebAssemblyMemory.h"
-#include "Library/WebAssemblyModule.h"
-#include "Library/WebAssembly.h"
+#include "Library/WASM/WebAssemblyEnvironment.h"
+#include "Library/WASM/WebAssemblyTable.h"
+#include "Library/WASM/WebAssemblyMemory.h"
+#include "Library/WASM/WebAssemblyModule.h"
+#include "Library/WASM/WebAssembly.h"
#include "Language/ModuleRecordBase.h"
#include "Language/SourceTextModuleRecord.h"
//#include "Language/ModuleNamespace.h"
#include "Types/ScriptFunctionType.h"
-#include "Library/ScriptFunction.h"
-#include "Library/StackScriptFunction.h"
+#include "Library/Functions/ScriptFunction.h"
+#include "Library/Functions/StackScriptFunction.h"
#ifdef _CHAKRACOREBUILD
#include "Library/CustomExternalWrapperObject.h"
@@ -559,9 +559,9 @@ enum tagDEBUG_EVENT_INFO_TYPE
#include "Debug/TTEventLog.h"
#endif
-#include "Library/JavascriptGeneratorFunction.h"
-#include "Library/JavascriptAsyncFunction.h"
-#include "Library/JavascriptAsyncGeneratorFunction.h"
+#include "Library/Generators/JavascriptGeneratorFunction.h"
+#include "Library/Generators/JavascriptAsyncFunction.h"
+#include "Library/Generators/JavascriptAsyncGeneratorFunction.h"
#include "../WasmReader/WasmReader.h"
@@ -580,8 +580,8 @@ enum tagDEBUG_EVENT_INFO_TYPE
#include "Language/JavascriptConversion.inl"
#include "Types/RecyclableObject.inl"
#include "Types/DynamicObject.inl"
-#include "Library/JavascriptArray.inl"
-#include "Library/SparseArraySegment.inl"
+#include "Library/Array/JavascriptArray.inl"
+#include "Library/Array/SparseArraySegment.inl"
#include "Library/JavascriptNumber.inl"
#include "Library/JavascriptLibrary.inl"
#include "Language/InlineCache.inl"
diff --git a/lib/Runtime/Types/ES5ArrayTypeHandler.cpp b/lib/Runtime/Types/ES5ArrayTypeHandler.cpp
index 80d418dbed0..86eae2cd156 100644
--- a/lib/Runtime/Types/ES5ArrayTypeHandler.cpp
+++ b/lib/Runtime/Types/ES5ArrayTypeHandler.cpp
@@ -1,10 +1,11 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "RuntimeTypePch.h"
-#include "Library/ES5Array.h"
+#include "Library/Array/ES5Array.h"
namespace Js
{
diff --git a/lib/SCACore/SCACorePch.h b/lib/SCACore/SCACorePch.h
index 3e3520e0b57..b4380f38421 100644
--- a/lib/SCACore/SCACorePch.h
+++ b/lib/SCACore/SCACorePch.h
@@ -1,5 +1,6 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 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
@@ -9,7 +10,7 @@
#endif
#include "Runtime.h"
-#include "Library/JavascriptRegularExpression.h"
+#include "Library/Regex/JavascriptRegularExpression.h"
#include "Library/JavascriptProxy.h"
#include "Library/SameValueComparer.h"
#include "Library/MapOrSetDataList.h"
diff --git a/lib/SCACore/SCASerialization.cpp b/lib/SCACore/SCASerialization.cpp
index e49ff5b020a..37ad9dab3b2 100644
--- a/lib/SCACore/SCASerialization.cpp
+++ b/lib/SCACore/SCASerialization.cpp
@@ -1,24 +1,25 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
+// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "SCACorePch.h"
#include "Common/ByteSwap.h"
#include "Library/JavascriptNumberObject.h"
-#include "Library/JavascriptStringObject.h"
+#include "Library/String/JavascriptStringObject.h"
#include "Library/JavascriptBooleanObject.h"
#include "Library/DateImplementation.h"
#include "Library/JavascriptDate.h"
#include "Library/DataView.h"
-#include "Library/ES5Array.h"
+#include "Library/Array/ES5Array.h"
#include "Types/PropertyIndexRanges.h"
#include "Types/DictionaryPropertyDescriptor.h"
#include "Types/DictionaryTypeHandler.h"
#include "Types/ES5ArrayTypeHandler.h"
-#include "Library/JavascriptArrayIndexStaticEnumerator.h"
-#include "Library/ES5ArrayIndexStaticEnumerator.h"
+#include "Library/Array/JavascriptArrayIndexStaticEnumerator.h"
+#include "Library/Array/ES5ArrayIndexStaticEnumerator.h"
namespace Js
{