The global object has special slots for built-in objects' prototypes,
constructors and properties. This makes explicit the formula to calculate the
slot number for these special slots.
In SM, classes are lazily resolved. If we detect that a class about to be used
has not yet been resolved, then we resolve it. However, the way that we decided
that they were resolved was broken. If the global object had a String property,
then it had been resolved. So what happened when we deleted the String
property? Well, it got resolved again.
Instead of using the String property of the global object, we now use the
contructor slot on the global object. This works fine for String, but some
classes don't have a constructor, like Math and JSON. For those classes, we set
the constructor slot to True. In either case, we can now tell that a class is
resolved if the constructor slot in not Undefined.
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1484: error: expected type-specifier before 'MemoryReporter_XPConnectJSMjitCode'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1484: error: expected `)' before 'MemoryReporter_XPConnectJSMjitCode'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1484: error: cannot convert 'int*' to 'nsIMemoryReporter*' for argument '1' to 'nsresult NS_RegisterMemoryReporter(nsIMemoryReporter*)'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1485: error: expected type-specifier before 'MemoryReporter_XPConnectJSMjitData'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1485: error: expected `)' before 'MemoryReporter_XPConnectJSMjitData'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1485: error: cannot convert 'int*' to 'nsIMemoryReporter*' for argument '1' to 'nsresult NS_RegisterMemoryReporter(nsIMemoryReporter*)'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1486: error: expected type-specifier before 'MemoryReporter_XPConnectJSTjitCode'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1486: error: expected `)' before 'MemoryReporter_XPConnectJSTjitCode'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1486: error: cannot convert 'int*' to 'nsIMemoryReporter*' for argument '1' to 'nsresult NS_RegisterMemoryReporter(nsIMemoryReporter*)'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1487: error: expected type-specifier before 'MemoryReporter_XPConnectJSTjitDataAllocatorsMain'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1487: error: expected `)' before 'MemoryReporter_XPConnectJSTjitDataAllocatorsMain'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1487: error: cannot convert 'int*' to 'nsIMemoryReporter*' for argument '1' to 'nsresult NS_RegisterMemoryReporter(nsIMemoryReporter*)'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1488: error: expected type-specifier before 'MemoryReporter_XPConnectJSTjitDataAllocatorsReserve'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1488: error: expected `)' before 'MemoryReporter_XPConnectJSTjitDataAllocatorsReserve'
/var/buildslave/mozilla-central-sparc64/build/js/src/xpconnect/src/xpcjsruntime.cpp:1488: error: cannot convert 'int*' to 'nsIMemoryReporter*' for argument '1' to 'nsresult NS_RegisterMemoryReporter(nsIMemoryReporter*)'