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

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

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/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/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 566
567 567
568 void JSGlobalObject::JSGlobalObjectVerify() { 568 void JSGlobalObject::JSGlobalObjectVerify() {
569 CHECK(IsJSGlobalObject()); 569 CHECK(IsJSGlobalObject());
570 // Do not check the dummy global object for the builtins. 570 // Do not check the dummy global object for the builtins.
571 if (GlobalDictionary::cast(properties())->NumberOfElements() == 0 && 571 if (GlobalDictionary::cast(properties())->NumberOfElements() == 0 &&
572 elements()->length() == 0) { 572 elements()->length() == 0) {
573 return; 573 return;
574 } 574 }
575 JSObjectVerify(); 575 JSObjectVerify();
576 for (int i = GlobalObject::kHeaderSize; i < JSGlobalObject::kSize;
577 i += kPointerSize) {
578 VerifyObjectField(i);
579 }
580 } 576 }
581 577
582 578
583 void Oddball::OddballVerify() { 579 void Oddball::OddballVerify() {
584 CHECK(IsOddball()); 580 CHECK(IsOddball());
585 Heap* heap = GetHeap(); 581 Heap* heap = GetHeap();
586 VerifyHeapPointer(to_string()); 582 VerifyHeapPointer(to_string());
587 Object* number = to_number(); 583 Object* number = to_number();
588 if (number->IsHeapObject()) { 584 if (number->IsHeapObject()) {
589 CHECK(number == heap->nan_value()); 585 CHECK(number == heap->nan_value());
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 1027
1032 #ifdef DEBUG 1028 #ifdef DEBUG
1033 1029
1034 void JSObject::IncrementSpillStatistics(SpillInformation* info) { 1030 void JSObject::IncrementSpillStatistics(SpillInformation* info) {
1035 info->number_of_objects_++; 1031 info->number_of_objects_++;
1036 // Named properties 1032 // Named properties
1037 if (HasFastProperties()) { 1033 if (HasFastProperties()) {
1038 info->number_of_objects_with_fast_properties_++; 1034 info->number_of_objects_with_fast_properties_++;
1039 info->number_of_fast_used_fields_ += map()->NextFreePropertyIndex(); 1035 info->number_of_fast_used_fields_ += map()->NextFreePropertyIndex();
1040 info->number_of_fast_unused_fields_ += map()->unused_property_fields(); 1036 info->number_of_fast_unused_fields_ += map()->unused_property_fields();
1041 } else if (IsGlobalObject()) { 1037 } else if (IsJSGlobalObject()) {
1042 GlobalDictionary* dict = global_dictionary(); 1038 GlobalDictionary* dict = global_dictionary();
1043 info->number_of_slow_used_properties_ += dict->NumberOfElements(); 1039 info->number_of_slow_used_properties_ += dict->NumberOfElements();
1044 info->number_of_slow_unused_properties_ += 1040 info->number_of_slow_unused_properties_ +=
1045 dict->Capacity() - dict->NumberOfElements(); 1041 dict->Capacity() - dict->NumberOfElements();
1046 } else { 1042 } else {
1047 NameDictionary* dict = property_dictionary(); 1043 NameDictionary* dict = property_dictionary();
1048 info->number_of_slow_used_properties_ += dict->NumberOfElements(); 1044 info->number_of_slow_used_properties_ += dict->NumberOfElements();
1049 info->number_of_slow_unused_properties_ += 1045 info->number_of_slow_unused_properties_ +=
1050 dict->Capacity() - dict->NumberOfElements(); 1046 dict->Capacity() - dict->NumberOfElements();
1051 } 1047 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 1309
1314 // Both are done at the same time. 1310 // Both are done at the same time.
1315 CHECK_EQ(new_it.done(), old_it.done()); 1311 CHECK_EQ(new_it.done(), old_it.done());
1316 } 1312 }
1317 1313
1318 1314
1319 #endif // DEBUG 1315 #endif // DEBUG
1320 1316
1321 } // namespace internal 1317 } // namespace internal
1322 } // namespace v8 1318 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698