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

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

Issue 7282026: Introduce code flushing of RegExp code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 5 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 case JSRegExp::ATOM: { 459 case JSRegExp::ATOM: {
460 FixedArray* arr = FixedArray::cast(data()); 460 FixedArray* arr = FixedArray::cast(data());
461 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 461 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
462 break; 462 break;
463 } 463 }
464 case JSRegExp::IRREGEXP: { 464 case JSRegExp::IRREGEXP: {
465 bool is_native = RegExpImpl::UsesNativeRegExp(); 465 bool is_native = RegExpImpl::UsesNativeRegExp();
466 466
467 FixedArray* arr = FixedArray::cast(data()); 467 FixedArray* arr = FixedArray::cast(data());
468 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); 468 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
469 // TheHole : Not compiled yet. 469 // Smi : Not compiled yet (-1) or code prepared for flushing.
470 // JSObject: Compilation error. 470 // JSObject: Compilation error.
471 // Code/ByteArray: Compiled code. 471 // Code/ByteArray: Compiled code.
472 ASSERT(ascii_data->IsTheHole() || ascii_data->IsJSObject() || 472 ASSERT(ascii_data->IsSmi() || ascii_data->IsJSObject() ||
473 (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); 473 (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray()));
474 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); 474 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
475 ASSERT(uc16_data->IsTheHole() || uc16_data->IsJSObject() || 475 ASSERT(uc16_data->IsSmi() || uc16_data->IsJSObject() ||
476 (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); 476 (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray()));
477
478 Object* ascii_saved = arr->get(JSRegExp::kIrregexpASCIICodeSavedIndex);
479 ASSERT(ascii_saved->IsSmi() || ascii_saved->IsJSObject() ||
Erik Corry 2011/07/01 10:26:38 Should be IsString!
480 ascii_saved->IsCode());
481 Object* uc16_saved = arr->get(JSRegExp::kIrregexpUC16CodeSavedIndex);
482 ASSERT(uc16_saved->IsSmi() || uc16_saved->IsJSObject() ||
483 uc16_saved->IsCode());
484
477 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); 485 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
478 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); 486 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
479 break; 487 break;
480 } 488 }
481 default: 489 default:
482 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); 490 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag());
483 ASSERT(data()->IsUndefined()); 491 ASSERT(data()->IsUndefined());
484 break; 492 break;
485 } 493 }
486 } 494 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 ASSERT(e->IsUndefined()); 759 ASSERT(e->IsUndefined());
752 } 760 }
753 } 761 }
754 } 762 }
755 } 763 }
756 764
757 765
758 #endif // DEBUG 766 #endif // DEBUG
759 767
760 } } // namespace v8::internal 768 } } // 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