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

Side by Side Diff: src/objects.h

Issue 7473031: Remaining changes to fully support FastDoubleArray. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 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 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 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 inline void set_length(int value); 2043 inline void set_length(int value);
2044 2044
2045 inline static FixedArrayBase* cast(Object* object); 2045 inline static FixedArrayBase* cast(Object* object);
2046 2046
2047 // Layout description. 2047 // Layout description.
2048 // Length is smi tagged when it is stored. 2048 // Length is smi tagged when it is stored.
2049 static const int kLengthOffset = HeapObject::kHeaderSize; 2049 static const int kLengthOffset = HeapObject::kHeaderSize;
2050 static const int kHeaderSize = kLengthOffset + kPointerSize; 2050 static const int kHeaderSize = kLengthOffset + kPointerSize;
2051 }; 2051 };
2052 2052
2053 class FixedDoubleArray;
2053 2054
2054 // FixedArray describes fixed-sized arrays with element type Object*. 2055 // FixedArray describes fixed-sized arrays with element type Object*.
2055 class FixedArray: public FixedArrayBase { 2056 class FixedArray: public FixedArrayBase {
2056 public: 2057 public:
2057 // Setter and getter for elements. 2058 // Setter and getter for elements.
2058 inline Object* get(int index); 2059 inline Object* get(int index);
2059 // Setter that uses write barrier. 2060 // Setter that uses write barrier.
2060 inline void set(int index, Object* value); 2061 inline void set(int index, Object* value);
2061 2062
2062 // Setter that doesn't need write barrier). 2063 // Setter that doesn't need write barrier).
(...skipping 22 matching lines...) Expand all
2085 // Copy operations. 2086 // Copy operations.
2086 MUST_USE_RESULT inline MaybeObject* Copy(); 2087 MUST_USE_RESULT inline MaybeObject* Copy();
2087 MUST_USE_RESULT MaybeObject* CopySize(int new_length); 2088 MUST_USE_RESULT MaybeObject* CopySize(int new_length);
2088 2089
2089 // Add the elements of a JSArray to this FixedArray. 2090 // Add the elements of a JSArray to this FixedArray.
2090 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); 2091 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array);
2091 2092
2092 // Compute the union of this and other. 2093 // Compute the union of this and other.
2093 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); 2094 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other);
2094 2095
2096 // Compute the union of this and other.
2097 MUST_USE_RESULT MaybeObject* UnionOfDoubleKeys(
2098 FixedDoubleArray* other);
2099
2095 // Copy a sub array from the receiver to dest. 2100 // Copy a sub array from the receiver to dest.
2096 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); 2101 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len);
2097 2102
2098 // Garbage collection support. 2103 // Garbage collection support.
2099 static int SizeFor(int length) { return kHeaderSize + length * kPointerSize; } 2104 static int SizeFor(int length) { return kHeaderSize + length * kPointerSize; }
2100 2105
2101 // Code Generation support. 2106 // Code Generation support.
2102 static int OffsetOfElementAt(int index) { return SizeFor(index); } 2107 static int OffsetOfElementAt(int index) { return SizeFor(index); }
2103 2108
2104 // Casting. 2109 // Casting.
(...skipping 5073 matching lines...) Expand 10 before | Expand all | Expand 10 after
7178 } else { 7183 } else {
7179 value &= ~(1 << bit_position); 7184 value &= ~(1 << bit_position);
7180 } 7185 }
7181 return value; 7186 return value;
7182 } 7187 }
7183 }; 7188 };
7184 7189
7185 } } // namespace v8::internal 7190 } } // namespace v8::internal
7186 7191
7187 #endif // V8_OBJECTS_H_ 7192 #endif // V8_OBJECTS_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