Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: src/objects-debug.cc

Issue 7540025: Merge regexp codeflushing (r8532+r8560) to the 3.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.3/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 case JSRegExp::ATOM: { 437 case JSRegExp::ATOM: {
438 FixedArray* arr = FixedArray::cast(data()); 438 FixedArray* arr = FixedArray::cast(data());
439 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 439 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
440 break; 440 break;
441 } 441 }
442 case JSRegExp::IRREGEXP: { 442 case JSRegExp::IRREGEXP: {
443 bool is_native = RegExpImpl::UsesNativeRegExp(); 443 bool is_native = RegExpImpl::UsesNativeRegExp();
444 444
445 FixedArray* arr = FixedArray::cast(data()); 445 FixedArray* arr = FixedArray::cast(data());
446 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); 446 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
447 // TheHole : Not compiled yet. 447 // Smi : Not compiled yet (-1) or code prepared for flushing.
448 // JSObject: Compilation error. 448 // JSObject: Compilation error.
449 // Code/ByteArray: Compiled code. 449 // Code/ByteArray: Compiled code.
450 ASSERT(ascii_data->IsTheHole() || ascii_data->IsJSObject() || 450 ASSERT(ascii_data->IsSmi() ||
451 (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); 451 (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray()));
452 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); 452 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
453 ASSERT(uc16_data->IsTheHole() || uc16_data->IsJSObject() || 453 ASSERT(uc16_data->IsSmi() ||
454 (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); 454 (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray()));
455
456 Object* ascii_saved = arr->get(JSRegExp::kIrregexpASCIICodeSavedIndex);
457 ASSERT(ascii_saved->IsSmi() || ascii_saved->IsString() ||
458 ascii_saved->IsCode());
459 Object* uc16_saved = arr->get(JSRegExp::kIrregexpUC16CodeSavedIndex);
460 ASSERT(uc16_saved->IsSmi() || uc16_saved->IsString() ||
461 uc16_saved->IsCode());
462
455 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); 463 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
456 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); 464 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
457 break; 465 break;
458 } 466 }
459 default: 467 default:
460 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); 468 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag());
461 ASSERT(data()->IsUndefined()); 469 ASSERT(data()->IsUndefined());
462 break; 470 break;
463 } 471 }
464 } 472 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 ASSERT(e->IsUndefined()); 737 ASSERT(e->IsUndefined());
730 } 738 }
731 } 739 }
732 } 740 }
733 } 741 }
734 742
735 743
736 #endif // DEBUG 744 #endif // DEBUG
737 745
738 } } // namespace v8::internal 746 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698