function SetupMath() {
// Setup math constants.
// ECMA-262, section 15.8.1.1.
- %OptimizeObjectForAddingMultipleProperties($Math, 26);
+ %OptimizeObjectForAddingMultipleProperties($Math, 8);
%SetProperty($Math,
"E",
2.7182818284590452354,
"SQRT2",
1.4142135623730951,
DONT_ENUM | DONT_DELETE | READ_ONLY);
+ %TransformToFastProperties($Math);
// Setup non-enumerable functions of the Math object and
// set their names.
// ----------------------------------------------------------------------------
function SetupNumber() {
- // Setup the constructor property on the Number prototype object.
%OptimizeObjectForAddingMultipleProperties($Number.prototype, 8);
+ // Setup the constructor property on the Number prototype object.
%SetProperty($Number.prototype, "constructor", $Number, DONT_ENUM);
%OptimizeObjectForAddingMultipleProperties($Number, 5);
"POSITIVE_INFINITY",
1/0,
DONT_ENUM | DONT_DELETE | READ_ONLY);
+ %TransformToFastProperties($Number);
// Setup non-enumerable functions on the Number prototype object.
InstallFunctions($Number.prototype, DONT_ENUM, $Array(