[webkit-dev] renaming some things in JavaScriptCore

Darin Adler darin at apple.com
Fri Jun 13 15:44:46 PDT 2008


I have some suggested name changes for JavaScriptCore code. I'll do  
these with the do-webcore-rename script.

Use JS prefix and simpler names for basic types, to complement JSValue  
and JSObject.

     "GetterSetterImp" => "JSGetterSetter",
     "NumberImp" => "JSNumberCell",
     "StringImp" => "JSString",

     "ArrayInstance" => "JSArray",
     "FunctionImp" => "JSFunction",

Cut down on confusing uses of "Object" and "Imp".

     "ArrayObjectImp" => "ArrayConstructor",

     "BooleanInstance" => "BooleanObject",
     "BooleanObjectImp" => "BooleanConstructor",

     "DateObjectFuncImp" => "DateFunction",
     "DateObjectImp" => "DateConstructor",

     "ErrorObjectImp" => "ErrorConstructor",
     "NativeErrorImp" => "NativeErrorConstructor",

     "FunctionObjectImp" => "FunctionConstructor",
     "InternalFunctionImp" => "InternalFunction",

     "MathObjectImp" => "MathObject",

     "NumberInstance" => "NumberObject",
     "NumberObjectImp" => "NumberConstructor",

     "ObjectObjectImp" => "ObjectConstructor",

     "RegExpImp" => "RegExpObject",
     "RegExpObjectImp" => "RegExpConstructor",
     "RegExpObjectImpPrivate" => "RegExpConstructorPrivate",
     "RegExpProtoFunc" => "RegExpFunction",

     "RegExpImpTable" => "regExpTable",
     "RegExpObjectImpTable" => "regExpConstructorTable",

     "StringInstance" => "StringObject",
     "StringInstanceThatMasqueradesAsUndefined" =>  
"StringObjectThatMasqueradesAsUndefined",
     "StringObjectImp" => "StringConstructor",
     "StringObjectFuncImp" => "StringConstructorFunction",

Give a less generic name to the argument list class.

     "List" => "JSArgumentList",

Change some filenames and header guards:

     "property_slot" => "PropertySlot",
     "scope_chain" => "ScopeChain",
     "scope_chain_mark" => "ScopeChainMark",

     "KJS_PROPERTY_SLOT_H" => "PropertySlot_h",
     "KJS_SCOPE_CHAIN_H" => "ScopeChain_h",
     "scope_chain_mark_h" => "ScopeChainMark_h",

I've sent these proposals out for feedback in the past, but didn't  
really get any responses. I'd like to make these changes soon. Please  
let me know if you have comments about these name changes.

Maciej suggested doing changes in smaller batches. My proposal would  
be to this set in four batches (the four sections above). Any thoughts  
on that?

     -- Darin



More information about the webkit-dev mailing list