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

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

Issue 155085: Separate native and interpreted regexp by compile time flag, not runtime. (Closed)
Patch Set: Addressed review comments. Adapted builds scripts. Created 11 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 void JSRegExp::JSRegExpVerify() { 707 void JSRegExp::JSRegExpVerify() {
708 JSObjectVerify(); 708 JSObjectVerify();
709 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); 709 ASSERT(data()->IsUndefined() || data()->IsFixedArray());
710 switch (TypeTag()) { 710 switch (TypeTag()) {
711 case JSRegExp::ATOM: { 711 case JSRegExp::ATOM: {
712 FixedArray* arr = FixedArray::cast(data()); 712 FixedArray* arr = FixedArray::cast(data());
713 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 713 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
714 break; 714 break;
715 } 715 }
716 case JSRegExp::IRREGEXP: { 716 case JSRegExp::IRREGEXP: {
717 bool is_native = RegExpImpl::UseNativeRegexp(); 717 bool is_native = RegExpImpl::UsesNativeRegExp();
718 718
719 FixedArray* arr = FixedArray::cast(data()); 719 FixedArray* arr = FixedArray::cast(data());
720 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); 720 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
721 ASSERT(ascii_data->IsTheHole() 721 ASSERT(ascii_data->IsTheHole()
722 || (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); 722 || (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray()));
723 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); 723 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
724 ASSERT(uc16_data->IsTheHole() 724 ASSERT(uc16_data->IsTheHole()
725 || (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); 725 || (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray()));
726 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); 726 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
727 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); 727 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 } 1090 }
1091 current = hash; 1091 current = hash;
1092 } 1092 }
1093 return true; 1093 return true;
1094 } 1094 }
1095 1095
1096 1096
1097 #endif // DEBUG 1097 #endif // DEBUG
1098 1098
1099 } } // namespace v8::internal 1099 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698