JavaScriptCore C++ Name Changes

Here are some name changes we’re planning for some classes and functions in JavaScriptCore in the KJS namespace:

Old Name New Names
ValueImp JSValue
AllocatedValueImp JSCell
ObjectImp JSObject
Undefined() jsUndefined()
Null() jsNull()
Boolean() jsBoolean(), jsTrue(), jsFalse()
Number() jsNumber(), jsNaN(), jsZero(), jsOne(), jsTwo()
String() jsString()

We want to take Imp suffixes off class names of subclasses of ObjectImp and JSObject.

We’re planning to eliminate the UndefinedImp, NullImp, and BooleanImp classes, and instead use special pointer values, somewhat like the ones for SimpleNumber. This will make it possible to check if a value is undefined by comparing with a constant, which will be smaller and faster than how it’s done today.