[webkit-dev] JavaScriptCore directory rearrangement proposal

Maciej Stachowiak mjs at apple.com
Mon Jun 16 00:09:09 PDT 2008



Here is a proposal for how to rearrange the directory structure of  
JavaScriptCore and move some files around. Comments welcome. First,  
here's the new proposed directories:

JavaScriptCore/
     api/
         impl/
     compiler/
     docs/
     os-win32/
     parser/
     pcre/
     runtime/
     vm/
     tools/
     tests/
         api/
         mozilla/
             ...
     wtf/
         gtk/
         mac/
         qt/
         win/
         wx/
         unicode/
            icu/
            qt4/

I wasn't sure where to move these files but I believe they can be  
removed:
     types.h
     LocalStorageEntry.h

I'm not sure where to put these:
     ExecState.cpp (runtime or vm?)
     ExecState.h
     completion.h (only used in interpreter.h)
     interpreter.cpp (this does not fit well into any of our  
categories - perhaps these should become non-static methods on  
JSGlobalObject)
     interpreter.h
     SymbolTable.h (runtime or compiler?)

Where specific files would go:

top level
     AllInOneFile.cpp
     config.h
     Shell.cpp

wtf/
     (contents unchanged)

pcre/
     (contents unchanged)

api/
     JavaScript.h
     JavaScriptCore.h
     JSBase.h
     JSContextRef.h
     JSObjectRef.h
     JSStringRef.h
     JSStringRefCF.h
     JSValueRef.h
     WebKitAvailability.h

api/impl/
     APICast.h
     JSBase.cpp
     JSCallbackConstructor.cpp
     JSCallbackConstructor.h
     JSCallbackFunction.cpp
     JSCallbackFunction.h
     JSCallbackObject.cpp
     JSCallbackObject.h
     JSCallbackObjectFunctions.h
     JSClassRef.cpp
     JSClassRef.h
     JSContextRef.cpp
     JSObjectRef.cpp
     JSRetainPtr.h
     JSStringRef.cpp
     JSStringRefCF.cpp
     JSValueRef.cpp


runtime/
     ArrayPrototype.cpp
     ArrayPrototype.h
     BooleanObject.cpp
     BooleanObject.h
     CallData.h
     collector.cpp
     collector.h
     CollectorHeapIntrospector.cpp
     CollectorHeapIntrospector.h
     CommonIdentifiers.cpp
     CommonIdentifiers.h
     ConstructData.h
     create_hash_table
     date_object.cpp
     date_object.h
     DateMath.cpp
     DateMath.h
     dtoa.cpp
     dtoa.h
     error_object.cpp
     error_object.h
     FunctionPrototype.cpp
     FunctionPrototype.h
     identifier.cpp
     identifier.h
     InitializeThreading.cpp
     InitializeThreading.h
     internal.cpp
     JSActivation.cpp
     JSActivation.h
     JSArray.cpp
     JSArray.h
     JSFunction.cpp
     JSFunction.h
     JSGlobalData.cpp
     JSGlobalData.h
     JSGlobalObject.cpp
     JSGlobalObject.h
     JSImmediate.cpp
     JSImmediate.h
     JSLock.cpp
     JSLock.h
     JSNotAnObject.cpp
     JSNotAnObject.h
     JSObject.cpp
     JSObject.h
     JSPropertyNameIterator.cpp
     JSPropertyNameIterator.h
     JSString.h
     JSType.h
     JSValue.cpp
     JSValue.h
     JSVariableObject.cpp
     JSWrapperObject.cpp
     JSWrapperObject.h
     list.cpp
     list.h
     lookup.cpp
     lookup.h
     MathObject.cpp
     MathObject.h
     NumberObject.cpp
     NumberObject.h
     object_object.cpp
     object_object.h
     operations.cpp
     operations.h
     PropertyMap.cpp
     PropertyMap.h
     PropertyNameArray.cpp
     PropertyNameArray.h
     PropertySlot.cpp
     PropertySlot.h
     protect.h
     regexp.cpp
     regexp.h
     RegExpObject.cpp
     RegExpObject.h
     ScopeChain.cpp
     ScopeChain.h
     ScopeChainMark.h
     string_object.cpp
     string_object.h
     ustring.cpp
     ustring.h

parser/
     grammar.y
     keywords.table
     lexer.cpp
     lexer.h
     nodes.cpp (but split out emitCode functions and move to compiler  
directory)
     nodes.h
     nodes2string.cpp
     Parser.cpp
     Parser.h
     SourceProvider.h
     SourceRange.h

compiler/
     CodeGenerator.cpp
     CodeGenerator.h
     LabelID.cpp
     LabelID.h
     LabelStack.h
     RegisterID.cpp
     RegisterID.h
     SegmentedVector.h

vm/
     CodeBlock.cpp
     CodeBlock.h
     ExceptionHelpers.cpp
     ExceptionHelpers.h
     Instruction.cpp
     Instruction.h
     Machine.cpp
     Machine.h
     Opcode.cpp
     Opcode.h
     Register.cpp
     Register.h
     RegisterFile.cpp
     RegisterFile.h
     RegisterFileStack.cpp
     RegisterFileStack.h

tools/
     debugger.cpp
     debugger.h
     DebuggerCallFrame.cpp
     DebuggerCallFrame.h
     Profile.cpp
     Profile.h
     ProfileNode.cpp
     ProfileNode.h
     Profiler.cpp
     Profiler.h

tests/api/
     JSNode.c
     JSNode.h
     JSNodeList.c
     JSNodeList.h
     minidom.c
     minidom.js
     Node.c
     Node.h
     NodeList.c
     NodeList.h
     testapi.c
     testapi.js



More information about the webkit-dev mailing list