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

Side by Side Diff: src/trig-table.h

Issue 448643002: Reland "Implement trigonometric functions using a fdlibm port." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix windows build and gc mole Created 6 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
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/debug-script.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_TRIG_TABLE_H_
6 #define V8_TRIG_TABLE_H_
7
8
9 namespace v8 {
10 namespace internal {
11
12 class TrigonometricLookupTable : public AllStatic {
13 public:
14 // Casting away const-ness to use as argument for typed array constructor.
15 static void* sin_table() {
16 return const_cast<double*>(&kSinTable[0]);
17 }
18
19 static void* cos_x_interval_table() {
20 return const_cast<double*>(&kCosXIntervalTable[0]);
21 }
22
23 static double samples_over_pi_half() { return kSamplesOverPiHalf; }
24 static int samples() { return kSamples; }
25 static int table_num_bytes() { return kTableSize * sizeof(*kSinTable); }
26 static int table_size() { return kTableSize; }
27
28 private:
29 static const double kSinTable[];
30 static const double kCosXIntervalTable[];
31 static const int kSamples;
32 static const int kTableSize;
33 static const double kSamplesOverPiHalf;
34 };
35
36 } } // namespace v8::internal
37
38 #endif // V8_TRIG_TABLE_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/debug-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698