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

Side by Side Diff: src/objects.h

Issue 7307030: Implement ICs for FastDoubleArray loads and stores (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix asserts 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 | « src/mips/stub-cache-mips.cc ('k') | 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 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 inline void set_the_hole(int index); 2166 inline void set_the_hole(int index);
2167 2167
2168 // Checking for the hole. 2168 // Checking for the hole.
2169 inline bool is_the_hole(int index); 2169 inline bool is_the_hole(int index);
2170 2170
2171 // Garbage collection support. 2171 // Garbage collection support.
2172 inline static int SizeFor(int length) { 2172 inline static int SizeFor(int length) {
2173 return kHeaderSize + length * kDoubleSize; 2173 return kHeaderSize + length * kDoubleSize;
2174 } 2174 }
2175 2175
2176 // The following can't be declared inline as const static 2176 inline static bool is_the_hole_nan(double value);
2177 // because they're 64-bit. 2177 inline static double hole_nan_as_double();
2178 static uint64_t kCanonicalNonHoleNanLower32; 2178 inline static double canonical_not_the_hole_nan_as_double();
2179 static uint64_t kCanonicalNonHoleNanInt64;
2180 static uint64_t kHoleNanInt64;
2181
2182 inline static bool is_the_hole_nan(double value) {
2183 return BitCast<uint64_t, double>(value) == kHoleNanInt64;
2184 }
2185
2186 inline static double hole_nan_as_double() {
2187 return BitCast<double, uint64_t>(kHoleNanInt64);
2188 }
2189
2190 inline static double canonical_not_the_hole_nan_as_double() {
2191 return BitCast<double, uint64_t>(kCanonicalNonHoleNanInt64);
2192 }
2193 2179
2194 // Casting. 2180 // Casting.
2195 static inline FixedDoubleArray* cast(Object* obj); 2181 static inline FixedDoubleArray* cast(Object* obj);
2196 2182
2197 // Maximal allowed size, in bytes, of a single FixedDoubleArray. 2183 // Maximal allowed size, in bytes, of a single FixedDoubleArray.
2198 // Prevents overflowing size computations, as well as extreme memory 2184 // Prevents overflowing size computations, as well as extreme memory
2199 // consumption. 2185 // consumption.
2200 static const int kMaxSize = 512 * MB; 2186 static const int kMaxSize = 512 * MB;
2201 // Maximally allowed length of a FixedArray. 2187 // Maximally allowed length of a FixedArray.
2202 static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize; 2188 static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize;
(...skipping 4969 matching lines...) Expand 10 before | Expand all | Expand 10 after
7172 } else { 7158 } else {
7173 value &= ~(1 << bit_position); 7159 value &= ~(1 << bit_position);
7174 } 7160 }
7175 return value; 7161 return value;
7176 } 7162 }
7177 }; 7163 };
7178 7164
7179 } } // namespace v8::internal 7165 } } // namespace v8::internal
7180 7166
7181 #endif // V8_OBJECTS_H_ 7167 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698