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

Side by Side Diff: src/heap-inl.h

Issue 12700008: remove latin-1 flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: removed SeqOneByteStringVerify Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/ia32/code-stubs-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 // Verify() is inline to avoid ifdef-s around its calls in release 647 // Verify() is inline to avoid ifdef-s around its calls in release
648 // mode. 648 // mode.
649 void ExternalStringTable::Verify() { 649 void ExternalStringTable::Verify() {
650 #ifdef DEBUG 650 #ifdef DEBUG
651 for (int i = 0; i < new_space_strings_.length(); ++i) { 651 for (int i = 0; i < new_space_strings_.length(); ++i) {
652 Object* obj = Object::cast(new_space_strings_[i]); 652 Object* obj = Object::cast(new_space_strings_[i]);
653 // TODO(yangguo): check that the object is indeed an external string. 653 // TODO(yangguo): check that the object is indeed an external string.
654 ASSERT(heap_->InNewSpace(obj)); 654 ASSERT(heap_->InNewSpace(obj));
655 ASSERT(obj != HEAP->the_hole_value()); 655 ASSERT(obj != HEAP->the_hole_value());
656 #ifndef ENABLE_LATIN_1
657 if (obj->IsExternalAsciiString()) {
658 ExternalAsciiString* string = ExternalAsciiString::cast(obj);
659 ASSERT(String::IsAscii(string->GetChars(), string->length()));
660 }
661 #endif
662 } 656 }
663 for (int i = 0; i < old_space_strings_.length(); ++i) { 657 for (int i = 0; i < old_space_strings_.length(); ++i) {
664 Object* obj = Object::cast(old_space_strings_[i]); 658 Object* obj = Object::cast(old_space_strings_[i]);
665 // TODO(yangguo): check that the object is indeed an external string. 659 // TODO(yangguo): check that the object is indeed an external string.
666 ASSERT(!heap_->InNewSpace(obj)); 660 ASSERT(!heap_->InNewSpace(obj));
667 ASSERT(obj != HEAP->the_hole_value()); 661 ASSERT(obj != HEAP->the_hole_value());
668 #ifndef ENABLE_LATIN_1
669 if (obj->IsExternalAsciiString()) {
670 ExternalAsciiString* string = ExternalAsciiString::cast(obj);
671 ASSERT(String::IsAscii(string->GetChars(), string->length()));
672 }
673 #endif
674 } 662 }
675 #endif 663 #endif
676 } 664 }
677 665
678 666
679 void ExternalStringTable::AddOldString(String* string) { 667 void ExternalStringTable::AddOldString(String* string) {
680 ASSERT(string->IsExternalString()); 668 ASSERT(string->IsExternalString());
681 ASSERT(!heap_->InNewSpace(string)); 669 ASSERT(!heap_->InNewSpace(string));
682 old_space_strings_.Add(string); 670 old_space_strings_.Add(string);
683 } 671 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 AssertNoAllocation::~AssertNoAllocation() { } 866 AssertNoAllocation::~AssertNoAllocation() { }
879 DisableAssertNoAllocation::DisableAssertNoAllocation() { } 867 DisableAssertNoAllocation::DisableAssertNoAllocation() { }
880 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } 868 DisableAssertNoAllocation::~DisableAssertNoAllocation() { }
881 869
882 #endif 870 #endif
883 871
884 872
885 } } // namespace v8::internal 873 } } // namespace v8::internal
886 874
887 #endif // V8_HEAP_INL_H_ 875 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698