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

Side by Side Diff: src/objects.h

Issue 6639024: Get rid of distinction between below- and above-watermark in page allocation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 9 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) 726 STRUCT_LIST(DECLARE_STRUCT_PREDICATE)
727 #undef DECLARE_STRUCT_PREDICATE 727 #undef DECLARE_STRUCT_PREDICATE
728 728
729 // Oddball testing. 729 // Oddball testing.
730 INLINE(bool IsUndefined()); 730 INLINE(bool IsUndefined());
731 INLINE(bool IsNull()); 731 INLINE(bool IsNull());
732 INLINE(bool IsTrue()); 732 INLINE(bool IsTrue());
733 INLINE(bool IsFalse()); 733 INLINE(bool IsFalse());
734 inline bool IsArgumentsMarker(); 734 inline bool IsArgumentsMarker();
735 735
736 // Filler objects (fillers and byte arrays).
737 inline bool IsFiller();
738
736 // Extract the number. 739 // Extract the number.
737 inline double Number(); 740 inline double Number();
738 741
739 inline bool HasSpecificClassOf(String* name); 742 inline bool HasSpecificClassOf(String* name);
740 743
741 MUST_USE_RESULT MaybeObject* ToObject(); // ECMA-262 9.9. 744 MUST_USE_RESULT MaybeObject* ToObject(); // ECMA-262 9.9.
742 Object* ToBoolean(); // ECMA-262 9.2. 745 Object* ToBoolean(); // ECMA-262 9.2.
743 746
744 // Convert to a JSObject if needed. 747 // Convert to a JSObject if needed.
745 // global_context is used when creating wrapper object. 748 // global_context is used when creating wrapper object.
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 2587
2585 // ByteArray represents fixed sized byte arrays. Used by the outside world, 2588 // ByteArray represents fixed sized byte arrays. Used by the outside world,
2586 // such as PCRE, and also by the memory allocator and garbage collector to 2589 // such as PCRE, and also by the memory allocator and garbage collector to
2587 // fill in free blocks in the heap. 2590 // fill in free blocks in the heap.
2588 class ByteArray: public HeapObject { 2591 class ByteArray: public HeapObject {
2589 public: 2592 public:
2590 // [length]: length of the array. 2593 // [length]: length of the array.
2591 inline int length(); 2594 inline int length();
2592 inline void set_length(int value); 2595 inline void set_length(int value);
2593 2596
2597 inline int Size() { return RoundUp(length() + kHeaderSize, kPointerSize); }
Vyacheslav Egorov (Chromium) 2011/03/15 09:20:09 What's the difference from ByteArraySize()?
Erik Corry 2011/03/17 13:39:17 None, but you have to have this one because it ove
2598
2594 // Setter and getter. 2599 // Setter and getter.
2595 inline byte get(int index); 2600 inline byte get(int index);
2596 inline void set(int index, byte value); 2601 inline void set(int index, byte value);
2597 2602
2598 // Treat contents as an int array. 2603 // Treat contents as an int array.
2599 inline int get_int(int index); 2604 inline int get_int(int index);
2600 2605
2601 static int SizeFor(int length) { 2606 static int SizeFor(int length) {
2602 return OBJECT_POINTER_ALIGN(kHeaderSize + length); 2607 return OBJECT_POINTER_ALIGN(kHeaderSize + length);
2603 } 2608 }
(...skipping 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after
6454 } else { 6459 } else {
6455 value &= ~(1 << bit_position); 6460 value &= ~(1 << bit_position);
6456 } 6461 }
6457 return value; 6462 return value;
6458 } 6463 }
6459 }; 6464 };
6460 6465
6461 } } // namespace v8::internal 6466 } } // namespace v8::internal
6462 6467
6463 #endif // V8_OBJECTS_H_ 6468 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698