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

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

Issue 7477045: Tentative implementation of string slices (hidden under the flag --string-slices). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some more suggested changes. Created 9 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 | Annotate | Revision Log
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // object->IsHeapNumber() and object->IsSeqString() because we already 311 // object->IsHeapNumber() and object->IsSeqString() because we already
312 // know that object has the heap object tag. 312 // know that object has the heap object tag.
313 313
314 // These objects are never allocated in new space. 314 // These objects are never allocated in new space.
315 ASSERT(type != MAP_TYPE); 315 ASSERT(type != MAP_TYPE);
316 ASSERT(type != CODE_TYPE); 316 ASSERT(type != CODE_TYPE);
317 ASSERT(type != ODDBALL_TYPE); 317 ASSERT(type != ODDBALL_TYPE);
318 ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE); 318 ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE);
319 319
320 if (type < FIRST_NONSTRING_TYPE) { 320 if (type < FIRST_NONSTRING_TYPE) {
321 // There are three string representations: sequential strings, cons 321 // There are four string representations: sequential strings, external
322 // strings, and external strings. Only cons strings contain 322 // strings, cons strings, and sliced strings.
323 // non-map-word pointers to heap objects. 323 // Only the latter two contain non-map-word pointers to heap objects.
324 return ((type & kStringRepresentationMask) == kConsStringTag) 324 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag)
325 ? OLD_POINTER_SPACE 325 ? OLD_POINTER_SPACE
326 : OLD_DATA_SPACE; 326 : OLD_DATA_SPACE;
327 } else { 327 } else {
328 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; 328 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE;
329 } 329 }
330 } 330 }
331 331
332 332
333 void Heap::CopyBlock(Address dst, Address src, int byte_size) { 333 void Heap::CopyBlock(Address dst, Address src, int byte_size) {
334 ASSERT(IsAligned(byte_size, kPointerSize)); 334 ASSERT(IsAligned(byte_size, kPointerSize));
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 #ifdef DEBUG 688 #ifdef DEBUG
689 UpdateLiveObjectCount(obj); 689 UpdateLiveObjectCount(obj);
690 #endif 690 #endif
691 obj->SetMark(); 691 obj->SetMark();
692 } 692 }
693 693
694 694
695 } } // namespace v8::internal 695 } } // namespace v8::internal
696 696
697 #endif // V8_HEAP_INL_H_ 697 #endif // V8_HEAP_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698