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

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

Issue 1267493006: Remove JSFunctionResultCache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 VerifyPointer(name()); 1018 VerifyPointer(name());
1019 line_offset()->SmiVerify(); 1019 line_offset()->SmiVerify();
1020 column_offset()->SmiVerify(); 1020 column_offset()->SmiVerify();
1021 VerifyPointer(wrapper()); 1021 VerifyPointer(wrapper());
1022 type()->SmiVerify(); 1022 type()->SmiVerify();
1023 VerifyPointer(line_ends()); 1023 VerifyPointer(line_ends());
1024 VerifyPointer(id()); 1024 VerifyPointer(id());
1025 } 1025 }
1026 1026
1027 1027
1028 void JSFunctionResultCache::JSFunctionResultCacheVerify() {
1029 JSFunction::cast(get(kFactoryIndex))->ObjectVerify();
1030
1031 int size = Smi::cast(get(kCacheSizeIndex))->value();
1032 CHECK(kEntriesIndex <= size);
1033 CHECK(size <= length());
1034 CHECK_EQ(0, size % kEntrySize);
1035
1036 int finger = Smi::cast(get(kFingerIndex))->value();
1037 CHECK(kEntriesIndex <= finger);
1038 CHECK((finger < size) || (finger == kEntriesIndex && finger == size));
1039 CHECK_EQ(0, finger % kEntrySize);
1040
1041 if (FLAG_enable_slow_asserts) {
1042 for (int i = kEntriesIndex; i < size; i++) {
1043 CHECK(!get(i)->IsTheHole());
1044 get(i)->ObjectVerify();
1045 }
1046 for (int i = size; i < length(); i++) {
1047 CHECK(get(i)->IsTheHole());
1048 get(i)->ObjectVerify();
1049 }
1050 }
1051 }
1052
1053
1054 void NormalizedMapCache::NormalizedMapCacheVerify() { 1028 void NormalizedMapCache::NormalizedMapCacheVerify() {
1055 FixedArray::cast(this)->FixedArrayVerify(); 1029 FixedArray::cast(this)->FixedArrayVerify();
1056 if (FLAG_enable_slow_asserts) { 1030 if (FLAG_enable_slow_asserts) {
1057 for (int i = 0; i < length(); i++) { 1031 for (int i = 0; i < length(); i++) {
1058 Object* e = FixedArray::get(i); 1032 Object* e = FixedArray::get(i);
1059 if (e->IsMap()) { 1033 if (e->IsMap()) {
1060 Map::cast(e)->DictionaryMapVerify(); 1034 Map::cast(e)->DictionaryMapVerify();
1061 } else { 1035 } else {
1062 CHECK(e->IsUndefined()); 1036 CHECK(e->IsUndefined());
1063 } 1037 }
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 1335
1362 // Both are done at the same time. 1336 // Both are done at the same time.
1363 CHECK_EQ(new_it.done(), old_it.done()); 1337 CHECK_EQ(new_it.done(), old_it.done());
1364 } 1338 }
1365 1339
1366 1340
1367 #endif // DEBUG 1341 #endif // DEBUG
1368 1342
1369 } // namespace internal 1343 } // namespace internal
1370 } // namespace v8 1344 } // namespace v8
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