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

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

Issue 9231017: Recursion limit for one-char string replace and retire String::kMinNonFlatLength. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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/runtime.h » ('j') | src/runtime.cc » ('J')
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } else if (IsSlicedString()) { 381 } else if (IsSlicedString()) {
382 SlicedString::cast(this)->SlicedStringVerify(); 382 SlicedString::cast(this)->SlicedStringVerify();
383 } 383 }
384 } 384 }
385 385
386 386
387 void ConsString::ConsStringVerify() { 387 void ConsString::ConsStringVerify() {
388 CHECK(this->first()->IsString()); 388 CHECK(this->first()->IsString());
389 CHECK(this->second() == GetHeap()->empty_string() || 389 CHECK(this->second() == GetHeap()->empty_string() ||
390 this->second()->IsString()); 390 this->second()->IsString());
391 CHECK(this->length() >= String::kMinNonFlatLength); 391 CHECK(this->length() >= ConsString::kMinLength);
392 if (this->IsFlat()) { 392 if (this->IsFlat()) {
393 // A flat cons can only be created by String::SlowTryFlatten. 393 // A flat cons can only be created by String::SlowTryFlatten.
394 // Afterwards, the first part may be externalized. 394 // Afterwards, the first part may be externalized.
395 CHECK(this->first()->IsSeqString() || this->first()->IsExternalString()); 395 CHECK(this->first()->IsSeqString() || this->first()->IsExternalString());
396 } 396 }
397 } 397 }
398 398
399 399
400 void SlicedString::SlicedStringVerify() { 400 void SlicedString::SlicedStringVerify() {
401 CHECK(!this->parent()->IsConsString()); 401 CHECK(!this->parent()->IsConsString());
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 ASSERT(e->IsUndefined()); 854 ASSERT(e->IsUndefined());
855 } 855 }
856 } 856 }
857 } 857 }
858 } 858 }
859 859
860 860
861 #endif // DEBUG 861 #endif // DEBUG
862 862
863 } } // namespace v8::internal 863 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698