Changeset 15507 for S60/trunk/JavaScriptCore
- Timestamp:
- 07/18/06 13:22:45 (2 years ago)
- Location:
- S60/trunk/JavaScriptCore
- Files:
-
- 6 modified
-
ChangeLog (modified) (1 diff)
-
kjs/date_object.cpp (modified) (18 diffs)
-
kjs/nodes.cpp (modified) (1 diff)
-
kjs/nodes.h (modified) (2 diffs)
-
kjs/object.h (modified) (2 diffs)
-
kjs/shared_ptr.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
S60/trunk/JavaScriptCore/ChangeLog
r15432 r15507 1 2006-07-18 brmorris <bradley.morrison> 2 3 Reviewed by Zalan/Sachin. 4 5 * kjs/date_object.cpp: support for utc 6 (formatDate): 7 (formatDateUTCVariant): 8 (formatTime): 9 (DateProtoFuncImp::call): 10 (DateObjectImp::call): 11 * kjs/nodes.cpp: 12 (BlockNode::~BlockNode): Implemented. 13 * kjs/nodes.h: ~BlockNode 14 * kjs/object.h: KJS_MAX_STACK set to 80 on hw 15 * kjs/shared_ptr.h: 16 (kxmlcore::SharedPtr::setNull): wrapped in NOKIA_CHANGES 17 1 18 2006-06-06 Bradley <bradley.morrison@nokia.com> 2 19 -
S60/trunk/JavaScriptCore/kjs/date_object.cpp
r14549 r15507 91 91 #define ctime(x) NotAllowedToCallThis() 92 92 #define strftime(a, b, c, d) NotAllowedToCallThis() 93 93 #endif 94 95 #if APPLE_CHANGES 94 96 static const char * const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; 95 97 static const char * const monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 98 #endif 99 100 101 #if APPLE_CHANGES && !NOKIA_CHANGES 96 102 97 103 static struct tm *tmUsingCF(time_t clock, CFTimeZoneRef timeZone) … … 264 270 CFDateFormatterStyle retVal = defaultStyle; 265 271 if (string == "short") 266 retVal = kCFDateFormatterShortStyle;272 retVal = kCFDateFormatterShortStyle; 267 273 else if (string == "medium") 268 retVal = kCFDateFormatterMediumStyle;274 retVal = kCFDateFormatterMediumStyle; 269 275 else if (string == "long") 270 retVal = kCFDateFormatterLongStyle;276 retVal = kCFDateFormatterLongStyle; 271 277 else if (string == "full") 272 retVal = kCFDateFormatterFullStyle;278 retVal = kCFDateFormatterFullStyle; 273 279 return retVal; 274 280 } … … 282 288 CFDateFormatterStyle timeStyle = (includeTime ? kCFDateFormatterLongStyle : kCFDateFormatterNoStyle); 283 289 284 UString arg0String;285 UString arg1String;286 bool useCustomFormat = false;287 UString customFormatString;290 UString arg0String; 291 UString arg1String; 292 bool useCustomFormat = false; 293 UString customFormatString; 288 294 arg0String = args[0].toString(exec); 289 295 if ((arg0String == "custom") && (argCount >= 2)) { 290 useCustomFormat = true;291 customFormatString = args[1].toString(exec);296 useCustomFormat = true; 297 customFormatString = args[1].toString(exec); 292 298 } else if (includeDate && includeTime && (argCount >= 2)) { 293 arg1String = args[1].toString(exec);294 dateStyle = styleFromArgString(arg0String,dateStyle);295 timeStyle = styleFromArgString(arg1String,timeStyle);299 arg1String = args[1].toString(exec); 300 dateStyle = styleFromArgString(arg0String,dateStyle); 301 timeStyle = styleFromArgString(arg1String,timeStyle); 296 302 } else if (includeDate && (argCount >= 1)) { 297 dateStyle = styleFromArgString(arg0String,dateStyle);303 dateStyle = styleFromArgString(arg0String,dateStyle); 298 304 } else if (includeTime && (argCount >= 1)) { 299 timeStyle = styleFromArgString(arg0String,timeStyle);305 timeStyle = styleFromArgString(arg0String,timeStyle); 300 306 } 301 307 CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, dateStyle, timeStyle); 302 308 if (useCustomFormat) { 303 CFStringRefcustomFormatCFString = CFStringCreateWithCharacters(NULL,(UniChar*)customFormatString.data(),customFormatString.size());304 CFDateFormatterSetFormat(formatter,customFormatCFString);305 CFRelease(customFormatCFString);309 CFStringRef customFormatCFString = CFStringCreateWithCharacters(NULL,(UniChar*)customFormatString.data(),customFormatString.size()); 310 CFDateFormatterSetFormat(formatter,customFormatCFString); 311 CFRelease(customFormatCFString); 306 312 } 307 313 CFStringRef string = CFDateFormatterCreateStringWithAbsoluteTime(NULL, formatter, time - kCFAbsoluteTimeIntervalSince1970); … … 341 347 342 348 343 344 345 349 static time_t timegm(tm* t) 346 350 { 347 // timegm use GMT time zone 348 return mktime(t) - User::UTCOffset().Int(); 349 } 350 351 352 static UString formatDate(tm &t) 353 { 354 TBuf<64> buf; 355 TTime tt( TDateTime(t.tm_year + 1900, TMonth(t.tm_mon), t.tm_mday-1, 356 t.tm_hour, t.tm_min, t.tm_sec, 0) ); 357 tt.FormatL( buf, KDateFormat ); 358 const UChar *p = (const UChar*)buf.Ptr(); 359 return UString( p, buf.Length() ); 360 } 361 362 static UString formatDateUTCVariant(tm &t) 363 { 364 TBuf<64> buf; 365 TTime tt( TDateTime(t.tm_year + 1900, TMonth(t.tm_mon), t.tm_mday-1, 366 t.tm_hour, t.tm_min, t.tm_sec, 0) ); 367 tt.FormatL( buf, KDateUTCVariant ); 368 const UChar *p = (const UChar*)buf.Ptr(); 369 return UString( p, buf.Length() ); 370 } 371 372 static UString formatTime(tm &t) 373 { 374 TBuf<64> buf; 375 TTime tt( TDateTime(t.tm_year + 1900, TMonth(t.tm_mon), t.tm_mday-1, 376 t.tm_hour, t.tm_min, t.tm_sec, 0) ); 377 tt.FormatL( buf, KTimeFormat ); 378 const UChar *p = (const UChar*)buf.Ptr(); 379 return UString( p, buf.Length() ); 351 // timegm use GMT time zone 352 return mktime(t) - User::UTCOffset().Int(); 353 } 354 355 356 static UString formatDate(struct tm &tm) 357 { 358 char buffer[100]; 359 sprintf(buffer, "%s %s %02d %04d", 360 weekdayName[(tm.tm_wday + 6) % 7], 361 monthName[tm.tm_mon], tm.tm_mday, tm.tm_year + 1900); 362 return buffer; 363 } 364 365 366 static UString formatDateUTCVariant(struct tm &tm) 367 { 368 char buffer[100]; 369 sprintf(buffer, "%s, %02d %s %04d", 370 weekdayName[(tm.tm_wday + 6) % 7], 371 tm.tm_mday, monthName[tm.tm_mon], tm.tm_year + 1900); 372 return buffer; 373 } 374 375 376 static UString formatTime(struct tm &tm, bool utc) 377 { 378 char buffer[100]; 379 TLocale locale; 380 TTimeIntervalSeconds universalTimeOffset(locale.UniversalTimeOffset()); 381 // add one hour daylight offset, if any 382 if( locale.QueryHomeHasDaylightSavingOn() ) 383 universalTimeOffset = universalTimeOffset.Int() - (60 * 60) ; 384 385 if (utc) { 386 sprintf(buffer, "%02d:%02d:%02d GMT", tm.tm_hour, tm.tm_min, tm.tm_sec); 387 } else { 388 int offset = universalTimeOffset.Int(); 389 if (offset < 0) { 390 offset = -offset; 391 } 392 sprintf(buffer, "%02d:%02d:%02d GMT%c%02d%02d", 393 tm.tm_hour, tm.tm_min, tm.tm_sec, 394 universalTimeOffset.Int() < 0 ? '-' : '+', offset / (60 * 60), (offset / 60) % 60); 395 } 396 return UString(buffer); 380 397 } 381 398 … … 383 400 static UString formatLocaleDate(KJS::ExecState *exec, time_t t_, bool includeDate, bool includeTime, const KJS::List &args) 384 401 { 385 TBuf<256> buf;386 struct tm* t = localtime( &t_ );387 TTime tt( TDateTime(t->tm_year + 1900, TMonth(t->tm_mon), t->tm_mday-1,388 t->tm_hour, t->tm_min, t->tm_sec, 0) );389 390 if( includeDate && includeTime )391 tt.FormatL( buf, KLocaleDateTime );392 else if( includeDate )393 tt.FormatL( buf, KLocaleDate );394 else if( includeTime )395 tt.FormatL( buf, KLocaleTime );396 397 const UChar *p = (const UChar*)buf.Ptr();398 return UString( p, buf.Length() );402 TBuf<256> buf; 403 struct tm* t = localtime( &t_ ); 404 TTime tt( TDateTime(t->tm_year + 1900, TMonth(t->tm_mon), t->tm_mday-1, 405 t->tm_hour, t->tm_min, t->tm_sec, 0) ); 406 407 if( includeDate && includeTime ) 408 tt.FormatL( buf, KLocaleDateTime ); 409 else if( includeDate ) 410 tt.FormatL( buf, KLocaleDate ); 411 else if( includeTime ) 412 tt.FormatL( buf, KLocaleTime ); 413 414 const UChar *p = (const UChar*)buf.Ptr(); 415 return UString( p, buf.Length() ); 399 416 } 400 417 … … 501 518 We use a negative ID to denote the "UTC" variant. 502 519 @begin dateTable 61 503 toString DateProtoFuncImp::ToString DontEnum|Function0504 toUTCString -DateProtoFuncImp::ToUTCString DontEnum|Function0505 toDateString DateProtoFuncImp::ToDateString DontEnum|Function0506 toTimeString DateProtoFuncImp::ToTimeString DontEnum|Function0507 toLocaleString DateProtoFuncImp::ToLocaleString DontEnum|Function0508 toLocaleDateString DateProtoFuncImp::ToLocaleDateString DontEnum|Function0509 toLocaleTimeString DateProtoFuncImp::ToLocaleTimeString DontEnum|Function0510 valueOf DateProtoFuncImp::ValueOf DontEnum|Function0511 getTime DateProtoFuncImp::GetTime DontEnum|Function0512 getFullYear DateProtoFuncImp::GetFullYear DontEnum|Function0513 getUTCFullYear -DateProtoFuncImp::GetFullYear DontEnum|Function0514 toGMTString -DateProtoFuncImp::ToGMTString DontEnum|Function0515 getMonth DateProtoFuncImp::GetMonth DontEnum|Function0516 getUTCMonth -DateProtoFuncImp::GetMonth DontEnum|Function0517 getDate DateProtoFuncImp::GetDate DontEnum|Function0518 getUTCDate -DateProtoFuncImp::GetDate DontEnum|Function0519 getDay DateProtoFuncImp::GetDay DontEnum|Function0520 getUTCDay -DateProtoFuncImp::GetDay DontEnum|Function0521 getHours DateProtoFuncImp::GetHours DontEnum|Function0522 getUTCHours -DateProtoFuncImp::GetHours DontEnum|Function0523 getMinutes DateProtoFuncImp::GetMinutes DontEnum|Function0524 getUTCMinutes -DateProtoFuncImp::GetMinutes DontEnum|Function0525 getSeconds DateProtoFuncImp::GetSeconds DontEnum|Function0526 getUTCSeconds -DateProtoFuncImp::GetSeconds DontEnum|Function0527 getMilliseconds DateProtoFuncImp::GetMilliSeconds DontEnum|Function0528 getUTCMilliseconds -DateProtoFuncImp::GetMilliSeconds DontEnum|Function0529 getTimezoneOffset DateProtoFuncImp::GetTimezoneOffset DontEnum|Function0530 setTime DateProtoFuncImp::SetTime DontEnum|Function1531 setMilliseconds DateProtoFuncImp::SetMilliSeconds DontEnum|Function1532 setUTCMilliseconds -DateProtoFuncImp::SetMilliSeconds DontEnum|Function1533 setSeconds DateProtoFuncImp::SetSeconds DontEnum|Function2534 setUTCSeconds -DateProtoFuncImp::SetSeconds DontEnum|Function2535 setMinutes DateProtoFuncImp::SetMinutes DontEnum|Function3536 setUTCMinutes -DateProtoFuncImp::SetMinutes DontEnum|Function3537 setHours DateProtoFuncImp::SetHours DontEnum|Function4538 setUTCHours -DateProtoFuncImp::SetHours DontEnum|Function4539 setDate DateProtoFuncImp::SetDate DontEnum|Function1540 setUTCDate -DateProtoFuncImp::SetDate DontEnum|Function1541 setMonth DateProtoFuncImp::SetMonth DontEnum|Function2542 setUTCMonth -DateProtoFuncImp::SetMonth DontEnum|Function2543 setFullYear DateProtoFuncImp::SetFullYear DontEnum|Function3544 setUTCFullYear -DateProtoFuncImp::SetFullYear DontEnum|Function3545 setYear DateProtoFuncImp::SetYear DontEnum|Function1546 getYear DateProtoFuncImp::GetYear DontEnum|Function0520 toString DateProtoFuncImp::ToString DontEnum|Function 0 521 toUTCString -DateProtoFuncImp::ToUTCString DontEnum|Function 0 522 toDateString DateProtoFuncImp::ToDateString DontEnum|Function 0 523 toTimeString DateProtoFuncImp::ToTimeString DontEnum|Function 0 524 toLocaleString DateProtoFuncImp::ToLocaleString DontEnum|Function 0 525 toLocaleDateString DateProtoFuncImp::ToLocaleDateString DontEnum|Function 0 526 toLocaleTimeString DateProtoFuncImp::ToLocaleTimeString DontEnum|Function 0 527 valueOf DateProtoFuncImp::ValueOf DontEnum|Function 0 528 getTime DateProtoFuncImp::GetTime DontEnum|Function 0 529 getFullYear DateProtoFuncImp::GetFullYear DontEnum|Function 0 530 getUTCFullYear -DateProtoFuncImp::GetFullYear DontEnum|Function 0 531 toGMTString -DateProtoFuncImp::ToGMTString DontEnum|Function 0 532 getMonth DateProtoFuncImp::GetMonth DontEnum|Function 0 533 getUTCMonth -DateProtoFuncImp::GetMonth DontEnum|Function 0 534 getDate DateProtoFuncImp::GetDate DontEnum|Function 0 535 getUTCDate -DateProtoFuncImp::GetDate DontEnum|Function 0 536 getDay DateProtoFuncImp::GetDay DontEnum|Function 0 537 getUTCDay -DateProtoFuncImp::GetDay DontEnum|Function 0 538 getHours DateProtoFuncImp::GetHours DontEnum|Function 0 539 getUTCHours -DateProtoFuncImp::GetHours DontEnum|Function 0 540 getMinutes DateProtoFuncImp::GetMinutes DontEnum|Function 0 541 getUTCMinutes -DateProtoFuncImp::GetMinutes DontEnum|Function 0 542 getSeconds DateProtoFuncImp::GetSeconds DontEnum|Function 0 543 getUTCSeconds -DateProtoFuncImp::GetSeconds DontEnum|Function 0 544 getMilliseconds DateProtoFuncImp::GetMilliSeconds DontEnum|Function 0 545 getUTCMilliseconds -DateProtoFuncImp::GetMilliSeconds DontEnum|Function 0 546 getTimezoneOffset DateProtoFuncImp::GetTimezoneOffset DontEnum|Function 0 547 setTime DateProtoFuncImp::SetTime DontEnum|Function 1 548 setMilliseconds DateProtoFuncImp::SetMilliSeconds DontEnum|Function 1 549 setUTCMilliseconds -DateProtoFuncImp::SetMilliSeconds DontEnum|Function 1 550 setSeconds DateProtoFuncImp::SetSeconds DontEnum|Function 2 551 setUTCSeconds -DateProtoFuncImp::SetSeconds DontEnum|Function 2 552 setMinutes DateProtoFuncImp::SetMinutes DontEnum|Function 3 553 setUTCMinutes -DateProtoFuncImp::SetMinutes DontEnum|Function 3 554 setHours DateProtoFuncImp::SetHours DontEnum|Function 4 555 setUTCHours -DateProtoFuncImp::SetHours DontEnum|Function 4 556 setDate DateProtoFuncImp::SetDate DontEnum|Function 1 557 setUTCDate -DateProtoFuncImp::SetDate DontEnum|Function 1 558 setMonth DateProtoFuncImp::SetMonth DontEnum|Function 2 559 setUTCMonth -DateProtoFuncImp::SetMonth DontEnum|Function 2 560 setFullYear DateProtoFuncImp::SetFullYear DontEnum|Function 3 561 setUTCFullYear -DateProtoFuncImp::SetFullYear DontEnum|Function 3 562 setYear DateProtoFuncImp::SetYear DontEnum|Function 1 563 getYear DateProtoFuncImp::GetYear DontEnum|Function 0 547 564 @end 548 565 */ … … 671 688 #if APPLE_CHANGES 672 689 case ToString: 673 result = String(formatDate(*t) + " " + formatTime(*t ));690 result = String(formatDate(*t) + " " + formatTime(*t, utc)); 674 691 break; 675 692 case ToDateString: … … 677 694 break; 678 695 case ToTimeString: 679 result = String(formatTime(*t ));696 result = String(formatTime(*t, utc)); 680 697 break; 681 698 case ToGMTString: 682 699 case ToUTCString: 683 result = String(formatDateUTCVariant(*t) + " " + formatTime(*t ));700 result = String(formatDateUTCVariant(*t) + " " + formatTime(*t, utc)); 684 701 break; 685 702 case ToLocaleString: … … 771 788 result = Number(_timezone / 60 - (_daylight ? 60 : 0)); 772 789 #elif NOKIA_CHANGES 773 {774 TLocale locale;775 TTimeIntervalSeconds universalTimeOffset(locale.UniversalTimeOffset());776 int offset = universalTimeOffset.Int()/60; // in minutes777 // add one hour daylight offset, if any778 if( locale.QueryHomeHasDaylightSavingOn() ) offset -= 60;779 780 // The getTimezoneOffset method returns an integer value representing the781 // number of minutes between the time on the current machine and UTC.782 // This number will be positive if you are behind UTC and783 // negative if you are ahead of UTC.784 // But TLocale UniversalTimeOffset() returns the Offset in seconds from785 // universal time, and Time zones east of universal time have positive786 // offsets and Time zones west of universal time have negative offsets.787 result = Number( -offset );788 }790 { 791 TLocale locale; 792 TTimeIntervalSeconds universalTimeOffset(locale.UniversalTimeOffset()); 793 int offset = universalTimeOffset.Int()/60; // in minutes 794 // add one hour daylight offset, if any 795 if( locale.QueryHomeHasDaylightSavingOn() ) offset -= 60; 796 797 // The getTimezoneOffset method returns an integer value representing the 798 // number of minutes between the time on the current machine and UTC. 799 // This number will be positive if you are behind UTC and 800 // negative if you are ahead of UTC. 801 // But TLocale UniversalTimeOffset() returns the Offset in seconds from 802 // universal time, and Time zones east of universal time have positive 803 // offsets and Time zones west of universal time have negative offsets. 804 result = Number( -offset ); 805 } 789 806 # else 790 807 // FIXME: Using the daylight value was wrong for BSD, maybe wrong here too. … … 969 986 #if APPLE_CHANGES 970 987 struct tm *tm = localtime(&t); 971 return String(formatDate(*tm) + " " + formatTime(*tm ));988 return String(formatDate(*tm) + " " + formatTime(*tm, false)); 972 989 #else 973 990 UString s(ctime(&t)); … … 1099 1116 # else 1100 1117 #ifdef NOKIA_CHANGES 1101 // Get Universal time offset1102 TLocale currentLocale;1118 // Get Universal time offset 1119 TLocale currentLocale; 1103 1120 currentLocale.Refresh(); 1104 1121 TTimeIntervalSeconds timeOffset( currentLocale.UniversalTimeOffset() ); 1105 utcOffset = -timeOffset.Int();1122 utcOffset = -timeOffset.Int(); 1106 1123 #else 1107 1124 utcOffset = -timezone; … … 1111 1128 #endif 1112 1129 } else { 1113 utcOffset = 0;1114 t->tm_isdst = -1;1130 utcOffset = 0; 1131 t->tm_isdst = -1; 1115 1132 } 1116 1133 … … 1188 1205 // Skip leading space 1189 1206 while(isspace(*dateString)) 1190 dateString++;1207 dateString++; 1191 1208 1192 1209 const char *wordStart = dateString; … … 1211 1228 1212 1229 while(isspace(*dateString)) 1213 dateString++;1230 dateString++; 1214 1231 1215 1232 if (!*dateString) 1216 return invalidDate;1233 return invalidDate; 1217 1234 1218 1235 // ' 09-Nov-99 23:12:40 GMT' … … 1223 1240 1224 1241 if (!*dateString) 1225 return invalidDate;1242 return invalidDate; 1226 1243 1227 1244 if (day < 1) … … 1248 1265 } 1249 1266 } else if (*dateString == '/' && day <= 12 && month == -1) { 1250 dateString++;1267 dateString++; 1251 1268 // This looks like a MM/DD/YYYY date, not an RFC date..... 1252 1269 month = day - 1; // 0-based … … 1360 1377 dateString++; 1361 1378 1362 if (strncasecmp(dateString, "AM", 2) == 0) {1363 if (hour > 12)1364 return invalidDate;1365 if (hour == 12)1366 hour = 0;1367 dateString += 2;1368 while (isspace(*dateString))1369 dateString++;1370 } else if (strncasecmp(dateString, "PM", 2) == 0) {1371 if (hour > 12)1372 return invalidDate;1373 if (hour != 12)1374 hour += 12;1375 dateString += 2;1376 while (isspace(*dateString))1377 dateString++;1378 }1379 if (strncasecmp(dateString, "AM", 2) == 0) { 1380 if (hour > 12) 1381 return invalidDate; 1382 if (hour == 12) 1383 hour = 0; 1384 dateString += 2; 1385 while (isspace(*dateString)) 1386 dateString++; 1387 } else if (strncasecmp(dateString, "PM", 2) == 0) { 1388 if (hour > 12) 1389 return invalidDate; 1390 if (hour != 12) 1391 hour += 12; 1392 dateString += 2; 1393 while (isspace(*dateString)) 1394 dateString++; 1395 } 1379 1396 } 1380 1397 } else { … … 1386 1403 if (*dateString) { 1387 1404 if (strncasecmp(dateString, "GMT", 3) == 0 || 1388 strncasecmp(dateString, "UTC", 3) == 0) {1405 strncasecmp(dateString, "UTC", 3) == 0) { 1389 1406 dateString += 3; 1390 1407 have_tz = true; -
S60/trunk/JavaScriptCore/kjs/nodes.cpp
r14719 r15507 1149 1149 } 1150 1150 1151 #ifdef NOKIA_CHANGES 1152 BlockNode::~BlockNode() 1153 { 1154 if( SourceElementsNode *src = source.get() ) { 1155 SourceElementsNode *s = src->elements.get(); 1156 //Avoid using the smart pointers as it will make things complicated 1157 while(s) { 1158 SourceElementsNode *next = s->elements.get(); 1159 s->elements.setNull(); 1160 s->deref(); 1161 s = next; 1162 } 1163 src->elements.setNull(); 1164 } 1165 } 1166 #endif 1167 1151 1168 // ECMA 12.1 1152 1169 Completion BlockNode::execute(ExecState *exec) -
S60/trunk/JavaScriptCore/kjs/nodes.h
r14549 r15507 52 52 53 53 enum Operator { OpEqual, 54 OpEqEq,55 OpNotEq,56 OpStrEq,57 OpStrNEq,58 OpPlusEq,59 OpMinusEq,60 OpMultEq,61 OpDivEq,54 OpEqEq, 55 OpNotEq, 56 OpStrEq, 57 OpStrNEq, 58 OpPlusEq, 59 OpMinusEq, 60 OpMultEq, 61 OpDivEq, 62 62 OpPlusPlus, 63 OpMinusMinus,64 OpLess,65 OpLessEq,66 OpGreater,67 OpGreaterEq,68 OpAndEq,69 OpXOrEq,70 OpOrEq,71 OpModEq,63 OpMinusMinus, 64 OpLess, 65 OpLessEq, 66 OpGreater, 67 OpGreaterEq, 68 OpAndEq, 69 OpXOrEq, 70 OpOrEq, 71 OpModEq, 72 72 OpAnd, 73 73 OpOr, 74 OpBitAnd,75 OpBitXOr,76 OpBitOr,77 OpLShift,78 OpRShift,79 OpURShift,80 OpIn,81 OpInstanceOf74 OpBitAnd, 75 OpBitXOr, 76 OpBitOr, 77 OpLShift, 78 OpRShift, 79 OpURShift, 80 OpIn, 81 OpInstanceOf 82 82 }; 83 83 84 84 class Node { 85 OOM_NEW_DELETE85 OOM_NEW_DELETE 86 86 public: 87 87 Node(); … … 615 615 public: 616 616 BlockNode(SourceElementsNode *s); 617 #ifdef NOKIA_CHANGES 618 ~BlockNode(); 619 #endif 617 620 virtual Completion execute(ExecState *exec); 618 621 virtual void processVarDecls(ExecState *exec); -
S60/trunk/JavaScriptCore/kjs/object.h
r14549 r15507 31 31 // maximum global call stack size. Protects against accidental or 32 32 // malicious infinite recursions. Define to -1 if you want no limit. 33 #if APPLE_CHANGES 33 #if NOKIA_CHANGES 34 // Browser hangs or crashes in hardware since some websites runout of stack memory, 35 // even before it hits the original KJS_MAX_STACK value of 100. So this value 36 // is reduced to 80 as a workaround to fix this issue. But the real fix would be 37 // to detect and prevent such infinite recursions and loops. 38 #if __WINSCW__ 39 #define KJS_MAX_STACK 100 40 #else 41 #define KJS_MAX_STACK 80 42 #endif // __WINSCW__ 43 #elif APPLE_CHANGES 34 44 // Given OS X stack sizes we run out of stack at about 350 levels. 35 45 // If we improve our stack usage, we can bump this number. … … 526 536 */ 527 537 IMPORT_C virtual bool hasProperty(ExecState *exec, 528 const Identifier &propertyName) const;538 const Identifier &propertyName) const; 529 539 IMPORT_C virtual bool hasProperty(ExecState *exec, unsigned propertyName) const; 530 540