ChakraCore icon indicating copy to clipboard operation
ChakraCore copied to clipboard

Restructure lib/Runtime/Library directory

Open MadProbe opened this issue 3 years ago • 5 comments

I am not sure if i moved all files to their folders correctly, so if you, @rhuanjl, have any suggestions to move something, i'll apply your changes without hesitation.

@ppenzin, Here is the changes: I added 8 folders with self-descriptive names: Array, Functions, Generators, Iterators, JSON, Regex, String, and WASM

MadProbe avatar Apr 19 '21 19:04 MadProbe

I'll look at this in more detail later; though quick note - ignore the CI copyright check error.

rhuanjl avatar Apr 19 '21 19:04 rhuanjl

@ppenzin interested what you think here as well - simply an attempt to make the lib/Runtime/Library folder a little easier to navigate with some new subfolders.

See index here: https://github.com/MadProbe/ChakraCore/tree/structurization/lib/Runtime/Library vs current master.

Of the new subfolders they all seem fairly self-explanatory and sensible to me other than perhaps the Functions one.

I also wonder if we should also move the following files (all of which are used for the self-hosted JS library methods) into the InJavascript folder:

IntlEngineInterfaceExtensionObject.cpp
IntlEngineInterfaceExtensionObject.h
IntlExtensionObjectBuiltins.h
EngineInterfaceObject.cpp
EngineInterfaceObject.h
EngineInterfaceObjectBuiltIns.h
JsBuiltInEngineInterfaceExtensionObject.cpp
JsBuiltInEngineInterfaceExtensionObject.h

rhuanjl avatar Apr 19 '21 19:04 rhuanjl

Looking at the proposed Functions folder some of the things in it are somewhat different things in particular:

  • the 4 ArgumentsObject files support the use of the arguments keyword they're not innate to functions
  • The 3 JavascriptBuiltInFunction are providing a list of library methods for the Jit to reference

rhuanjl avatar Apr 21 '21 07:04 rhuanjl

Is it at all an issue for you that a broad restructuring change will make it difficult to propagate changes from released MSFT branches to master? This includes CVE fixes and any outstanding feature work, like the change I've been holding onto to share types with deleted properties.

pleath avatar Apr 21 '21 18:04 pleath

Is it at all an issue for you that a broad restructuring change will make it difficult to propagate changes from released MSFT branches to master? This includes CVE fixes and any outstanding feature work, like the change I've been holding onto to share types with deleted properties.

This is a valid point - I was the under the impression that we weren't expecting any significant further MSFT input. But perhaps it's worth delaying this for a little longer

rhuanjl avatar Apr 21 '21 18:04 rhuanjl