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

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

Issue 28311: Flattened the representation of compiled RegExp data. (Closed)
Patch Set: ... and it lints. Created 11 years, 9 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
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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 JSObjectVerify(); 688 JSObjectVerify();
689 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); 689 ASSERT(data()->IsUndefined() || data()->IsFixedArray());
690 switch (TypeTag()) { 690 switch (TypeTag()) {
691 case JSRegExp::ATOM: { 691 case JSRegExp::ATOM: {
692 FixedArray* arr = FixedArray::cast(data()); 692 FixedArray* arr = FixedArray::cast(data());
693 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 693 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
694 break; 694 break;
695 } 695 }
696 case JSRegExp::IRREGEXP: { 696 case JSRegExp::IRREGEXP: {
697 FixedArray* arr = FixedArray::cast(data()); 697 FixedArray* arr = FixedArray::cast(data());
698 Object* irregexp_data = arr->get(JSRegExp::kIrregexpDataIndex); 698 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
699 ASSERT(irregexp_data->IsFixedArray()); 699 ASSERT(ascii_data->IsTheHole()
700 || (FLAG_regexp_native ?
701 ascii_data->IsCode()
702 : ascii_data->IsByteArray()));
703 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
704 ASSERT(uc16_data->IsTheHole()
705 || (FLAG_regexp_native ?
706 uc16_data->IsCode()
707 : uc16_data->IsByteArray()));
708 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
709 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
700 break; 710 break;
701 } 711 }
702 default: 712 default:
703 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); 713 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag());
704 ASSERT(data()->IsUndefined()); 714 ASSERT(data()->IsUndefined());
705 break; 715 break;
706 } 716 }
707 } 717 }
708 718
709 719
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } 1085 }
1076 current = hash; 1086 current = hash;
1077 } 1087 }
1078 return true; 1088 return true;
1079 } 1089 }
1080 1090
1081 1091
1082 #endif // DEBUG 1092 #endif // DEBUG
1083 1093
1084 } } // namespace v8::internal 1094 } } // namespace v8::internal
OLDNEW
« src/jsregexp.cc ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698