Changeset 29508 in webkit for trunk/JavaScriptCore/kjs/date_object.cpp
- Timestamp:
- Jan 15, 2008, 10:43:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/date_object.cpp
r29217 r29508 376 376 FIXMEL We could use templates to simplify the UTC variants. 377 377 @begin dateTable 61 378 toString &DateProtoFuncToString::createDontEnum|Function 0379 toUTCString &DateProtoFuncToUTCString::createDontEnum|Function 0380 toDateString &DateProtoFuncToDateString::createDontEnum|Function 0381 toTimeString &DateProtoFuncToTimeString::createDontEnum|Function 0382 toLocaleString &DateProtoFuncToLocaleString::createDontEnum|Function 0383 toLocaleDateString &DateProtoFuncToLocaleDateString::createDontEnum|Function 0384 toLocaleTimeString &DateProtoFuncToLocaleTimeString::createDontEnum|Function 0385 valueOf &DateProtoFuncValueOf::createDontEnum|Function 0386 getTime &DateProtoFuncGetTime::create DontEnum|Function 0387 getFullYear &DateProtoFuncGetFullYear::createDontEnum|Function 0388 getUTCFullYear &DateProtoFuncGetUTCFullYear::createDontEnum|Function 0389 toGMTString &DateProtoFuncToGMTString::createDontEnum|Function 0390 getMonth &DateProtoFuncGetMonth::createDontEnum|Function 0391 getUTCMonth &DateProtoFuncGetUTCMonth::createDontEnum|Function 0392 getDate &DateProtoFuncGetDate::create DontEnum|Function 0393 getUTCDate &DateProtoFuncGetUTCDate::create DontEnum|Function 0394 getDay &DateProtoFuncGetDay::createDontEnum|Function 0395 getUTCDay &DateProtoFuncGetUTCDay::createDontEnum|Function 0396 getHours &DateProtoFuncGetHours::createDontEnum|Function 0397 getUTCHours &DateProtoFuncGetUTCHours::createDontEnum|Function 0398 getMinutes &DateProtoFuncGetMinutes::createDontEnum|Function 0399 getUTCMinutes &DateProtoFuncGetUTCMinutes::createDontEnum|Function 0400 getSeconds &DateProtoFuncGetSeconds::createDontEnum|Function 0401 getUTCSeconds &DateProtoFuncGetUTCSeconds::createDontEnum|Function 0402 getMilliseconds &DateProtoFuncGetMilliSeconds::createDontEnum|Function 0403 getUTCMilliseconds &DateProtoFuncGetUTCMilliseconds::createDontEnum|Function 0404 getTimezoneOffset &DateProtoFuncGetTimezoneOffset::createDontEnum|Function 0405 setTime &DateProtoFuncSetTime::create DontEnum|Function 1406 setMilliseconds &DateProtoFuncSetMilliSeconds::createDontEnum|Function 1407 setUTCMilliseconds &DateProtoFuncSetUTCMilliseconds::createDontEnum|Function 1408 setSeconds &DateProtoFuncSetSeconds::createDontEnum|Function 2409 setUTCSeconds &DateProtoFuncSetUTCSeconds::createDontEnum|Function 2410 setMinutes &DateProtoFuncSetMinutes::createDontEnum|Function 3411 setUTCMinutes &DateProtoFuncSetUTCMinutes::createDontEnum|Function 3412 setHours &DateProtoFuncSetHours::createDontEnum|Function 4413 setUTCHours &DateProtoFuncSetUTCHours::createDontEnum|Function 4414 setDate &DateProtoFuncSetDate::create DontEnum|Function 1415 setUTCDate &DateProtoFuncSetUTCDate::create DontEnum|Function 1416 setMonth &DateProtoFuncSetMonth::createDontEnum|Function 2417 setUTCMonth &DateProtoFuncSetUTCMonth::createDontEnum|Function 2418 setFullYear &DateProtoFuncSetFullYear::createDontEnum|Function 3419 setUTCFullYear &DateProtoFuncSetUTCFullYear::createDontEnum|Function 3420 setYear &DateProtoFuncSetYear::createDontEnum|Function 1421 getYear &DateProtoFuncGetYear::createDontEnum|Function 0378 toString dateProtoFuncToString DontEnum|Function 0 379 toUTCString dateProtoFuncToUTCString DontEnum|Function 0 380 toDateString dateProtoFuncToDateString DontEnum|Function 0 381 toTimeString dateProtoFuncToTimeString DontEnum|Function 0 382 toLocaleString dateProtoFuncToLocaleString DontEnum|Function 0 383 toLocaleDateString dateProtoFuncToLocaleDateString DontEnum|Function 0 384 toLocaleTimeString dateProtoFuncToLocaleTimeString DontEnum|Function 0 385 valueOf dateProtoFuncValueOf DontEnum|Function 0 386 getTime dateProtoFuncGetTime DontEnum|Function 0 387 getFullYear dateProtoFuncGetFullYear DontEnum|Function 0 388 getUTCFullYear dateProtoFuncGetUTCFullYear DontEnum|Function 0 389 toGMTString dateProtoFuncToGMTString DontEnum|Function 0 390 getMonth dateProtoFuncGetMonth DontEnum|Function 0 391 getUTCMonth dateProtoFuncGetUTCMonth DontEnum|Function 0 392 getDate dateProtoFuncGetDate DontEnum|Function 0 393 getUTCDate dateProtoFuncGetUTCDate DontEnum|Function 0 394 getDay dateProtoFuncGetDay DontEnum|Function 0 395 getUTCDay dateProtoFuncGetUTCDay DontEnum|Function 0 396 getHours dateProtoFuncGetHours DontEnum|Function 0 397 getUTCHours dateProtoFuncGetUTCHours DontEnum|Function 0 398 getMinutes dateProtoFuncGetMinutes DontEnum|Function 0 399 getUTCMinutes dateProtoFuncGetUTCMinutes DontEnum|Function 0 400 getSeconds dateProtoFuncGetSeconds DontEnum|Function 0 401 getUTCSeconds dateProtoFuncGetUTCSeconds DontEnum|Function 0 402 getMilliseconds dateProtoFuncGetMilliSeconds DontEnum|Function 0 403 getUTCMilliseconds dateProtoFuncGetUTCMilliseconds DontEnum|Function 0 404 getTimezoneOffset dateProtoFuncGetTimezoneOffset DontEnum|Function 0 405 setTime dateProtoFuncSetTime DontEnum|Function 1 406 setMilliseconds dateProtoFuncSetMilliSeconds DontEnum|Function 1 407 setUTCMilliseconds dateProtoFuncSetUTCMilliseconds DontEnum|Function 1 408 setSeconds dateProtoFuncSetSeconds DontEnum|Function 2 409 setUTCSeconds dateProtoFuncSetUTCSeconds DontEnum|Function 2 410 setMinutes dateProtoFuncSetMinutes DontEnum|Function 3 411 setUTCMinutes dateProtoFuncSetUTCMinutes DontEnum|Function 3 412 setHours dateProtoFuncSetHours DontEnum|Function 4 413 setUTCHours dateProtoFuncSetUTCHours DontEnum|Function 4 414 setDate dateProtoFuncSetDate DontEnum|Function 1 415 setUTCDate dateProtoFuncSetUTCDate DontEnum|Function 1 416 setMonth dateProtoFuncSetMonth DontEnum|Function 2 417 setUTCMonth dateProtoFuncSetUTCMonth DontEnum|Function 2 418 setFullYear dateProtoFuncSetFullYear DontEnum|Function 3 419 setUTCFullYear dateProtoFuncSetUTCFullYear DontEnum|Function 3 420 setYear dateProtoFuncSetYear DontEnum|Function 1 421 getYear dateProtoFuncGetYear DontEnum|Function 0 422 422 @end 423 423 */ … … 431 431 } 432 432 433 bool DatePrototype::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)433 bool DatePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 434 434 { 435 435 return getStaticFunctionSlot<JSObject>(exec, &dateTable, this, propertyName, slot); … … 936 936 // Functions 937 937 938 JSValue* DateProtoFuncToString::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)938 JSValue* dateProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&) 939 939 { 940 940 if (!thisObj->inherits(&DateInstance::info)) … … 954 954 } 955 955 956 JSValue* DateProtoFuncToUTCString::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)956 JSValue* dateProtoFuncToUTCString(ExecState* exec, JSObject* thisObj, const List&) 957 957 { 958 958 if (!thisObj->inherits(&DateInstance::info)) … … 972 972 } 973 973 974 JSValue* DateProtoFuncToDateString::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)974 JSValue* dateProtoFuncToDateString(ExecState* exec, JSObject* thisObj, const List&) 975 975 { 976 976 if (!thisObj->inherits(&DateInstance::info)) … … 990 990 } 991 991 992 JSValue* DateProtoFuncToTimeString::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)992 JSValue* dateProtoFuncToTimeString(ExecState* exec, JSObject* thisObj, const List&) 993 993 { 994 994 if (!thisObj->inherits(&DateInstance::info)) … … 1008 1008 } 1009 1009 1010 JSValue* DateProtoFuncToLocaleString::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1010 JSValue* dateProtoFuncToLocaleString(ExecState* exec, JSObject* thisObj, const List& args) 1011 1011 { 1012 1012 if (!thisObj->inherits(&DateInstance::info)) … … 1033 1033 } 1034 1034 1035 JSValue* DateProtoFuncToLocaleDateString::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1035 JSValue* dateProtoFuncToLocaleDateString(ExecState* exec, JSObject* thisObj, const List& args) 1036 1036 { 1037 1037 if (!thisObj->inherits(&DateInstance::info)) … … 1058 1058 } 1059 1059 1060 JSValue* DateProtoFuncToLocaleTimeString::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1060 JSValue* dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject* thisObj, const List& args) 1061 1061 { 1062 1062 if (!thisObj->inherits(&DateInstance::info)) … … 1083 1083 } 1084 1084 1085 JSValue* DateProtoFuncValueOf::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1085 JSValue* dateProtoFuncValueOf(ExecState* exec, JSObject* thisObj, const List&) 1086 1086 { 1087 1087 if (!thisObj->inherits(&DateInstance::info)) … … 1097 1097 } 1098 1098 1099 JSValue* DateProtoFuncGetTime::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1099 JSValue* dateProtoFuncGetTime(ExecState* exec, JSObject* thisObj, const List&) 1100 1100 { 1101 1101 if (!thisObj->inherits(&DateInstance::info)) … … 1111 1111 } 1112 1112 1113 JSValue* DateProtoFuncGetFullYear::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1113 JSValue* dateProtoFuncGetFullYear(ExecState* exec, JSObject* thisObj, const List&) 1114 1114 { 1115 1115 if (!thisObj->inherits(&DateInstance::info)) … … 1129 1129 } 1130 1130 1131 JSValue* DateProtoFuncGetUTCFullYear::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1131 JSValue* dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject* thisObj, const List&) 1132 1132 { 1133 1133 if (!thisObj->inherits(&DateInstance::info)) … … 1147 1147 } 1148 1148 1149 JSValue* DateProtoFuncToGMTString::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1149 JSValue* dateProtoFuncToGMTString(ExecState* exec, JSObject* thisObj, const List&) 1150 1150 { 1151 1151 if (!thisObj->inherits(&DateInstance::info)) … … 1165 1165 } 1166 1166 1167 JSValue* DateProtoFuncGetMonth::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1167 JSValue* dateProtoFuncGetMonth(ExecState* exec, JSObject* thisObj, const List&) 1168 1168 { 1169 1169 if (!thisObj->inherits(&DateInstance::info)) … … 1183 1183 } 1184 1184 1185 JSValue* DateProtoFuncGetUTCMonth::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1185 JSValue* dateProtoFuncGetUTCMonth(ExecState* exec, JSObject* thisObj, const List&) 1186 1186 { 1187 1187 if (!thisObj->inherits(&DateInstance::info)) … … 1201 1201 } 1202 1202 1203 JSValue* DateProtoFuncGetDate::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1203 JSValue* dateProtoFuncGetDate(ExecState* exec, JSObject* thisObj, const List&) 1204 1204 { 1205 1205 if (!thisObj->inherits(&DateInstance::info)) … … 1219 1219 } 1220 1220 1221 JSValue* DateProtoFuncGetUTCDate::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1221 JSValue* dateProtoFuncGetUTCDate(ExecState* exec, JSObject* thisObj, const List&) 1222 1222 { 1223 1223 if (!thisObj->inherits(&DateInstance::info)) … … 1237 1237 } 1238 1238 1239 JSValue* DateProtoFuncGetDay::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1239 JSValue* dateProtoFuncGetDay(ExecState* exec, JSObject* thisObj, const List&) 1240 1240 { 1241 1241 if (!thisObj->inherits(&DateInstance::info)) … … 1255 1255 } 1256 1256 1257 JSValue* DateProtoFuncGetUTCDay::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1257 JSValue* dateProtoFuncGetUTCDay(ExecState* exec, JSObject* thisObj, const List&) 1258 1258 { 1259 1259 if (!thisObj->inherits(&DateInstance::info)) … … 1273 1273 } 1274 1274 1275 JSValue* DateProtoFuncGetHours::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1275 JSValue* dateProtoFuncGetHours(ExecState* exec, JSObject* thisObj, const List&) 1276 1276 { 1277 1277 if (!thisObj->inherits(&DateInstance::info)) … … 1291 1291 } 1292 1292 1293 JSValue* DateProtoFuncGetUTCHours::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1293 JSValue* dateProtoFuncGetUTCHours(ExecState* exec, JSObject* thisObj, const List&) 1294 1294 { 1295 1295 if (!thisObj->inherits(&DateInstance::info)) … … 1309 1309 } 1310 1310 1311 JSValue* DateProtoFuncGetMinutes::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1311 JSValue* dateProtoFuncGetMinutes(ExecState* exec, JSObject* thisObj, const List&) 1312 1312 { 1313 1313 if (!thisObj->inherits(&DateInstance::info)) … … 1327 1327 } 1328 1328 1329 JSValue* DateProtoFuncGetUTCMinutes::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1329 JSValue* dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject* thisObj, const List&) 1330 1330 { 1331 1331 if (!thisObj->inherits(&DateInstance::info)) … … 1345 1345 } 1346 1346 1347 JSValue* DateProtoFuncGetSeconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1347 JSValue* dateProtoFuncGetSeconds(ExecState* exec, JSObject* thisObj, const List&) 1348 1348 { 1349 1349 if (!thisObj->inherits(&DateInstance::info)) … … 1363 1363 } 1364 1364 1365 JSValue* DateProtoFuncGetUTCSeconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1365 JSValue* dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject* thisObj, const List&) 1366 1366 { 1367 1367 if (!thisObj->inherits(&DateInstance::info)) … … 1381 1381 } 1382 1382 1383 JSValue* DateProtoFuncGetMilliSeconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1383 JSValue* dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject* thisObj, const List&) 1384 1384 { 1385 1385 if (!thisObj->inherits(&DateInstance::info)) … … 1397 1397 } 1398 1398 1399 JSValue* DateProtoFuncGetUTCMilliseconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1399 JSValue* dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject* thisObj, const List&) 1400 1400 { 1401 1401 if (!thisObj->inherits(&DateInstance::info)) … … 1413 1413 } 1414 1414 1415 JSValue* DateProtoFuncGetTimezoneOffset::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1415 JSValue* dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject* thisObj, const List&) 1416 1416 { 1417 1417 if (!thisObj->inherits(&DateInstance::info)) … … 1431 1431 } 1432 1432 1433 JSValue* DateProtoFuncSetTime::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1433 JSValue* dateProtoFuncSetTime(ExecState* exec, JSObject* thisObj, const List& args) 1434 1434 { 1435 1435 if (!thisObj->inherits(&DateInstance::info)) … … 1486 1486 } 1487 1487 1488 JSValue* DateProtoFuncSetMilliSeconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1488 JSValue* dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject* thisObj, const List& args) 1489 1489 { 1490 1490 const bool inputIsUTC = false; … … 1492 1492 } 1493 1493 1494 JSValue* DateProtoFuncSetUTCMilliseconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1494 JSValue* dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject* thisObj, const List& args) 1495 1495 { 1496 1496 const bool inputIsUTC = true; … … 1498 1498 } 1499 1499 1500 JSValue* DateProtoFuncSetSeconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1500 JSValue* dateProtoFuncSetSeconds(ExecState* exec, JSObject* thisObj, const List& args) 1501 1501 { 1502 1502 const bool inputIsUTC = false; … … 1504 1504 } 1505 1505 1506 JSValue* DateProtoFuncSetUTCSeconds::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1506 JSValue* dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject* thisObj, const List& args) 1507 1507 { 1508 1508 const bool inputIsUTC = true; … … 1510 1510 } 1511 1511 1512 JSValue* DateProtoFuncSetMinutes::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1512 JSValue* dateProtoFuncSetMinutes(ExecState* exec, JSObject* thisObj, const List& args) 1513 1513 { 1514 1514 const bool inputIsUTC = false; … … 1516 1516 } 1517 1517 1518 JSValue* DateProtoFuncSetUTCMinutes::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1518 JSValue* dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject* thisObj, const List& args) 1519 1519 { 1520 1520 const bool inputIsUTC = true; … … 1522 1522 } 1523 1523 1524 JSValue* DateProtoFuncSetHours::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1524 JSValue* dateProtoFuncSetHours(ExecState* exec, JSObject* thisObj, const List& args) 1525 1525 { 1526 1526 const bool inputIsUTC = false; … … 1528 1528 } 1529 1529 1530 JSValue* DateProtoFuncSetUTCHours::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1530 JSValue* dateProtoFuncSetUTCHours(ExecState* exec, JSObject* thisObj, const List& args) 1531 1531 { 1532 1532 const bool inputIsUTC = true; … … 1534 1534 } 1535 1535 1536 JSValue* DateProtoFuncSetDate::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1536 JSValue* dateProtoFuncSetDate(ExecState* exec, JSObject* thisObj, const List& args) 1537 1537 { 1538 1538 const bool inputIsUTC = false; … … 1540 1540 } 1541 1541 1542 JSValue* DateProtoFuncSetUTCDate::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1542 JSValue* dateProtoFuncSetUTCDate(ExecState* exec, JSObject* thisObj, const List& args) 1543 1543 { 1544 1544 const bool inputIsUTC = true; … … 1546 1546 } 1547 1547 1548 JSValue* DateProtoFuncSetMonth::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1548 JSValue* dateProtoFuncSetMonth(ExecState* exec, JSObject* thisObj, const List& args) 1549 1549 { 1550 1550 const bool inputIsUTC = false; … … 1552 1552 } 1553 1553 1554 JSValue* DateProtoFuncSetUTCMonth::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1554 JSValue* dateProtoFuncSetUTCMonth(ExecState* exec, JSObject* thisObj, const List& args) 1555 1555 { 1556 1556 const bool inputIsUTC = true; … … 1558 1558 } 1559 1559 1560 JSValue* DateProtoFuncSetFullYear::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1560 JSValue* dateProtoFuncSetFullYear(ExecState* exec, JSObject* thisObj, const List& args) 1561 1561 { 1562 1562 const bool inputIsUTC = false; … … 1564 1564 } 1565 1565 1566 JSValue* DateProtoFuncSetUTCFullYear::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1566 JSValue* dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject* thisObj, const List& args) 1567 1567 { 1568 1568 const bool inputIsUTC = true; … … 1570 1570 } 1571 1571 1572 JSValue* DateProtoFuncSetYear::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)1572 JSValue* dateProtoFuncSetYear(ExecState* exec, JSObject* thisObj, const List& args) 1573 1573 { 1574 1574 if (!thisObj->inherits(&DateInstance::info)) … … 1593 1593 } 1594 1594 1595 JSValue* DateProtoFuncGetYear::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)1595 JSValue* dateProtoFuncGetYear(ExecState* exec, JSObject* thisObj, const List&) 1596 1596 { 1597 1597 if (!thisObj->inherits(&DateInstance::info))
Note:
See TracChangeset
for help on using the changeset viewer.