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

Side by Side Diff: src/objects.h

Issue 863633002: Use signaling NaN for holes in fixed double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Next bunch of fixes Created 5 years, 11 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
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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 // Gives access to raw memory which stores the array's data. 2581 // Gives access to raw memory which stores the array's data.
2582 inline double* data_start(); 2582 inline double* data_start();
2583 2583
2584 inline void FillWithHoles(int from, int to); 2584 inline void FillWithHoles(int from, int to);
2585 2585
2586 // Code Generation support. 2586 // Code Generation support.
2587 static int OffsetOfElementAt(int index) { return SizeFor(index); } 2587 static int OffsetOfElementAt(int index) { return SizeFor(index); }
2588 2588
2589 inline static bool is_the_hole_nan(double value); 2589 inline static bool is_the_hole_nan(double value);
2590 inline static double hole_nan_as_double(); 2590 inline static double hole_nan_as_double();
2591 inline static double canonical_not_the_hole_nan_as_double();
2592 2591
2593 DECLARE_CAST(FixedDoubleArray) 2592 DECLARE_CAST(FixedDoubleArray)
2594 2593
2595 // Maximal allowed size, in bytes, of a single FixedDoubleArray. 2594 // Maximal allowed size, in bytes, of a single FixedDoubleArray.
2596 // Prevents overflowing size computations, as well as extreme memory 2595 // Prevents overflowing size computations, as well as extreme memory
2597 // consumption. 2596 // consumption.
2598 static const int kMaxSize = 512 * MB; 2597 static const int kMaxSize = 512 * MB;
2599 // Maximally allowed length of a FixedArray. 2598 // Maximally allowed length of a FixedArray.
2600 static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize; 2599 static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize;
2601 2600
(...skipping 8332 matching lines...) Expand 10 before | Expand all | Expand 10 after
10934 } else { 10933 } else {
10935 value &= ~(1 << bit_position); 10934 value &= ~(1 << bit_position);
10936 } 10935 }
10937 return value; 10936 return value;
10938 } 10937 }
10939 }; 10938 };
10940 10939
10941 } } // namespace v8::internal 10940 } } // namespace v8::internal
10942 10941
10943 #endif // V8_OBJECTS_H_ 10942 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698