JavaScriptCore C++ Name Changes
Posted by Darin Adler on Tuesday, August 16th, 2005 at 9:14 pmHere 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/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.