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

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

Issue 367113003: Revert "Turn old space cons strings into regular external strings (not short)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/objects.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 // 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 #ifndef V8_HEAP_INL_H_ 5 #ifndef V8_HEAP_INL_H_
6 #define V8_HEAP_INL_H_ 6 #define V8_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 // asserts here, but check everything explicitly. 463 // asserts here, but check everything explicitly.
464 if (obj->map() == one_pointer_filler_map()) return false; 464 if (obj->map() == one_pointer_filler_map()) return false;
465 InstanceType type = obj->map()->instance_type(); 465 InstanceType type = obj->map()->instance_type();
466 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); 466 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
467 AllocationSpace src = chunk->owner()->identity(); 467 AllocationSpace src = chunk->owner()->identity();
468 switch (src) { 468 switch (src) {
469 case NEW_SPACE: 469 case NEW_SPACE:
470 return dst == src || dst == TargetSpaceId(type); 470 return dst == src || dst == TargetSpaceId(type);
471 case OLD_POINTER_SPACE: 471 case OLD_POINTER_SPACE:
472 return dst == src && (dst == TargetSpaceId(type) || obj->IsFiller() || 472 return dst == src && (dst == TargetSpaceId(type) || obj->IsFiller() ||
473 (obj->IsExternalString())); 473 (obj->IsExternalString() &&
474 ExternalString::cast(obj)->is_short()));
474 case OLD_DATA_SPACE: 475 case OLD_DATA_SPACE:
475 return dst == src && dst == TargetSpaceId(type); 476 return dst == src && dst == TargetSpaceId(type);
476 case CODE_SPACE: 477 case CODE_SPACE:
477 return dst == src && type == CODE_TYPE; 478 return dst == src && type == CODE_TYPE;
478 case MAP_SPACE: 479 case MAP_SPACE:
479 case CELL_SPACE: 480 case CELL_SPACE:
480 case PROPERTY_CELL_SPACE: 481 case PROPERTY_CELL_SPACE:
481 case LO_SPACE: 482 case LO_SPACE:
482 return false; 483 return false;
483 case INVALID_SPACE: 484 case INVALID_SPACE:
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 805
805 806
806 double GCTracer::SizeOfHeapObjects() { 807 double GCTracer::SizeOfHeapObjects() {
807 return (static_cast<double>(heap_->SizeOfObjects())) / MB; 808 return (static_cast<double>(heap_->SizeOfObjects())) / MB;
808 } 809 }
809 810
810 811
811 } } // namespace v8::internal 812 } } // namespace v8::internal
812 813
813 #endif // V8_HEAP_INL_H_ 814 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698